java -xbootclass path is no longer a supported option

℡╲_俬逩灬. 提交于 2020-02-02 13:16:06

问题


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 property sun.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

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!