问题
I upgrade the linux system and java package was also upgraded and i was running a jar file with command java -Xbootclasspath/p:b.jar -jar c.jar
and error occurs says -Xbootclasspath/p is no longer a supported option.
Error: Could not create the Java Virtual Machine.
Error: A fatal exception has occurred. Program will exit.
now what to do iam not a java programmer i just need to run that jar file !
any help!
回答1:
thanks guys i just solved the problem by calling java interpreter in JDKv8 in /usr/lib/jvm/java-8-openjdk-amd64/bin
as after upgrade java bin was symlink to /usr/lib/jvm/java-10-openjdk-amd64/bin/java
and i could execute it successfly
回答2:
From the Java 9 Release notes:
The boot class path has been mostly removed in this release. The java
-Xbootclasspath
and-Xbootclasspath/p
options have been removed. The javac-bootclaspath
option can only be used when compiling to JDK 8 or older. The system propertysun.boot.class.path
has been removed. Deployments that rely on overriding platform classes for testing purposes with-Xbootclasspath/p
will need to changed to use the--patch-module
option that is documented in JEP 261. The-Xbootclasspath/a
option is unchanged.
来源:https://stackoverflow.com/questions/50867372/java-xbootclass-path-is-no-longer-a-supported-option