See javac in Java Platform, Standard Edition Tools Reference. If possible, use the new -release flag instead of the Use 6 or later.Įrror: Target option 1.5 is no longer supported. Warning: bootstrap class path not set in conjunction with -source 5Įrror: Source option 5 is no longer supported. In JDK 9 and above, those values cause an error. In JDK 8, -source and -target values of 1.5/5 and earlier were deprecated, and caused a warning. The supported -source/-target values are 11 (the default), 10, 9, 8, 7, and 6 (6 is deprecated, and a warning is displayed when this value is used). If you use the -source and -target options with javac, then check the values that you use. This code generates the following error message from the compiler: M圜lass.java:2: error: as of release 9, '_' is a keyword, and may not be used as a legal identifier. It generates a warning in JDK 8, and an error, starting from JDK 9.Īs an example: static Object _ = new Object() If you use the underscore character ("_") as a one-character identifier in source code, then your code won’t compile in JDK 11. If you need to compile your code with JDK 11 compiler, then take note of the following: See JEP 320: Remove the Java EE and CORBA Modules to get more information about possible replacements for the modules.Ĭompiling your code with the latest JDK compiler will ease migration to future releases since the code may depend on APIs and features, which have been identified as problematic. Similarly, code on the class path with references to classes in these APIs will fail with NoDefClassFoundError or ClassNotFoundException unless changes are made in how the application is deployed. .ee: Aggregator module for the six modules aboveĮxisting code with references to classes in these APIs will not compile without changes to the build.java.activation: JavaBeans Activation Framework.ansaction: The subset of the Java Transaction API defined by Java SE to support CORBA Object Transaction Services.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |