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 ?
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.