what is the target option like say javac -target 1.2 file.java first is the syntax ok. assuming say i have jdk version 1.3 (say) then the above would compile my file with respect to 1.2 version. is that ok ?
You may find all the information you need at javac - Java programming language compiler Moving this to Java in General (Beginner) [ August 29, 2002: Message edited by: Valentin Crettaz ]
Your syntax is correct and you would seem to understand what it does correctly. If I recall correctly, the Java 2 SDK 1.3 by default compiles for 1.2. Note that this only (potentially) changes the format of the class file. If you've specified newer API class files for use with your program, then it still won't work on an older JVM that doesn't have access to these newer API class files.