![]() In this document, we will go through a few Java-specific features. In our case, we wanted the compatibility for Java 8, but the Java 9 bootstrap class got picked by default.įor this to work, we must use – Xbootclasspath to point to the path of the Java version for which cross-compilation is desired: /jdk9path/bin/javac TestForSourceAndTarget.java -source 8 -target 8 -Xbootclasspath $/jre/lib/rt. Visual Studio Code is a source code editor first and foremost with rich editing features. As it turns out, we have to provide the bootstrap class file path so that javac can pick the correct file for cross-compilation. javac informed us that the bootstrap classes are not in conjunction with – source 8. Oracles commercially-licensed JDK 19 binaries, based on the same code, are here. Let's take a look at that warning we got during the compilation. The place to collaborate on an open-source implementation of the Java. However, during compilation, we only got a warning. Ideally, Java should have thrown this error at compilation time. (Ljava/lang/Object Ljava/lang/Object )Ljava/util/List Īt (TestForSourceAndTarget.java:7) Let's run the code with Java 8, and we can see the error: $ /jdk8path/bin/java TestForSourceAndTargetĮxception in thread "main" : ↩ Warning: bootstrap class path not set in conjunction with -source 8 ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |