Search code examples
javajavac

In the JDK 1.6 compiler, what does "-source 1.6" enable, if anything?


I'm aware of the class file format change using -target 1.6 (which is required when you use -source 1.6). But does the source option specifically change anything or enable any new features?


Solution

  • From the javac documentation:

    1.6 - This is the default value. No language changes were introduced in Java SE 6. However, encoding errors in source files are now reported as errors, instead of warnings, as previously.