
-----------------------------------
wtd
Sat Oct 02, 2004 7:43 pm

[Tip] Compiling 1.4.x code with Java 1.5.0
-----------------------------------
Tiger improves a lot of things, but there are some small things it changes, so if you have old code that won't compile with the JDK 1.5, use the following command to specify that the source code is written for Java 1.4.x:

javac -source 1.4 MySourceFile.java

-----------------------------------
Hikaru79
Wed Dec 22, 2004 1:47 am


-----------------------------------
Just thought I'd add that, if you compile 1.4.2 code with 1.5, and don't want it to be interpreted as 1.4.2 code but the compiler warns you that there are some deprecated functions being called, run the compiler again with

javac -Xlint:deprecated CupOf.java


This will return a diagnostic of all the old, obsolete commands in CupOf.java.
