fool fool - 5 months ago 12
Java Question

how to compile java in 1.6 or older version without changing the classpath and path ? you only need to use command line to execute same

how to compile java in 1.6 or older version without changing the classpath and path ? you only need to use command line to execute same.

similar

javac var -1.6 Hello.java
java Hello

Answer

to compile java in 1.6 or older version without changing the classpath and path

  javac -source 1.6 Test.java

this will help you to understand by using

javac -help

-source <release>    Provide source compatibility with specified release
Comments