B4J Question Java 10: -Xbootclasspath/p is no longer a supported option.

Jmu5667

Well-Known Member
Licensed User
Longtime User
Hello

Under Java 10 I get the following error:

C:\Users\Administrator\Desktop\Aspect Hello>java -Xbootclasspath/p:alpn-boot-8.1
.12.v20180117.jar -jar ies_svr_aspect_hello.jar
-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.

What is the solution ?

Regards

John.
 

OliverA

Expert
Licensed User
Longtime User
Looks like since Java 9, some things are changing and will need to be changed on this end for proper support. See https://github.com/jetty-project/jetty-alpn/issues/15. A couple of quotes from that link:
Unfortunately you still need the bootclasspath for JDK 8 only, so it's not a completely transparent solution, as you have to change the command line depending on the JDK version.
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
Longtime User
Upvote 0

OliverA

Expert
Licensed User
Longtime User
Looking at the MANIFEST.MF file included in the jetty_b4j.jar file included in B4J version 6.01, the Jetty version is 9.4.6.v20170531.

Quoting from https://webtide.com/getting-started-with-jetty-and-jdk-9/:

Given these two pieces of information, JDK9 and up and -Xbootclasspath/p:alpn-boot-8.1.12.v20180117.jar with the current included Jetty will not happen.

Please note that JDK8 is considered LTS (long term support), and JDK9 and JDK10 are not (http://www.oracle.com/technetwork/java/eol-135779.html). Oracle even says this about Java SE 9 and 10.
Java SE 9 will be a short term release, and users should immediately transition to the next release (18.3) when available. Java SE 10 (18.3) will be a short term release and users should transition to the next release when available.
The next LTS version will be 11, which is expected to be available in September 2018. So until the next LTS comes out, I would personally just stick with 8.
 
Upvote 0

Jmu5667

Well-Known Member
Licensed User
Longtime User


Great piece of detective work, at least we know to stick with Java 8. Many thanks
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…