![]() ![]() The valid arguments for the -release flag follow the same policy as for -source and -target, one plus three back. source N -target N -bootclasspath $PATH_TO_rt.jar_FOR_RELEASE_N The -release N flag is conceptually a macro for: If possible, use the new -release flag instead of the -source and -target options. Use 1.6 or later.Įrror: Target option 1.5 is no longer supported. Warning: bootstrap class path not set in conjunction with -source 1.5Įrror: Source option 1.5 is no longer supported. In JDK 8, -source and -target values of 1.5/5 and earlier were deprecated and caused a warning to be generated. The supported -source/-target values are 9 (the default), 8, 7, and 6 (6 is deprecated, and a warning is displayed when this value is used). In JDK 9, javac uses a "one plus three back" policy of supporting -source and -target options. ![]() If you use the -source and -target options with javac, then check the values that you use. M圜lass.java:2: error: as of release 9, '_' is a keyword, and may not be used as a legal identifier. This code generates the following error message from the compiler: Its use generates a warning in JDK 8, and an error in JDK 9. If you use the underscore character ("_") as a one-character identifier in source code, then your code won’t compile in JDK 9. If you need to compile your code with the JDK 9 compiler then take note of the following: Compiling your code with the JDK 9 compiler will ease migration to future releases since the code may depend on APIs and features which have been identified as problematic. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |