Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

java

javac

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?

like image 874
Mark Renouf Avatar asked Jan 21 '26 13:01

Mark Renouf


1 Answers

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.

like image 85
Brian Agnew Avatar answered Jan 24 '26 07:01

Brian Agnew



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!