The latest jextract early access build Build 22-jextract+2-11 (2024/2/20) is broken.
Downloaded Mac OS early access bits from "Build 22-jextract+2-11 (2024/2/20)" section of
https://jdk.java.net/jextract/
Expanded tar.gz and ran jextract from the same;
$ ./jextract t.h
Unrecognized option: \--enable-native-access=org.openjdk.jextract\
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
This is because of wrong change in make/Build.gmk
Correct change is as follows:
diff --git a/make/Build.gmk b/make/Build.gmk
index d1962a0..7c473e0 100644
--- a/make/Build.gmk
+++ b/make/Build.gmk
@@ -83,7 +83,7 @@ $(JEXTRACT_IMAGE_DIR): $(BUILD_MODULES_DIR)
--output "$(JEXTRACT_IMAGE_DIR)" \
--module-path "$(BUILD_MODULES_DIR)" \
--add-modules org.openjdk.jextract \
- --add-options '\"--enable-native-access=org.openjdk.jextract\" \"--enable-preview\"' \
+ --add-options "\"--enable-native-access=org.openjdk.jextract\" \"--enable-preview\"" \
--launcher jextract=org.openjdk.jextract/org.openjdk.jextract.JextractTool
Downloaded Mac OS early access bits from "Build 22-jextract+2-11 (2024/2/20)" section of
https://jdk.java.net/jextract/
Expanded tar.gz and ran jextract from the same;
$ ./jextract t.h
Unrecognized option: \--enable-native-access=org.openjdk.jextract\
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
This is because of wrong change in make/Build.gmk
Correct change is as follows:
diff --git a/make/Build.gmk b/make/Build.gmk
index d1962a0..7c473e0 100644
--- a/make/Build.gmk
+++ b/make/Build.gmk
@@ -83,7 +83,7 @@ $(JEXTRACT_IMAGE_DIR): $(BUILD_MODULES_DIR)
--output "$(JEXTRACT_IMAGE_DIR)" \
--module-path "$(BUILD_MODULES_DIR)" \
--add-modules org.openjdk.jextract \
- --add-options '\"--enable-native-access=org.openjdk.jextract\" \"--enable-preview\"' \
+ --add-options "\"--enable-native-access=org.openjdk.jextract\" \"--enable-preview\"" \
--launcher jextract=org.openjdk.jextract/org.openjdk.jextract.JextractTool
- relates to
-
CODETOOLS-7903669 jextract-22 jextract tool shows enable native access warning
-
- Resolved
-