Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 [Tip] Compiling 1.4.x code with Java 1.5.0
Index -> Programming, Java -> Java Tutorials
View previous topic Printable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
wtd




PostPosted: Sat Oct 02, 2004 7:43 pm   Post subject: [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:

code:
javac -source 1.4 MySourceFile.java
Sponsor
Sponsor
Sponsor
sponsor
Hikaru79




PostPosted: Wed Dec 22, 2004 1:47 am   Post subject: (No subject)

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
code:

javac -Xlint:deprecated CupOf.java


This will return a diagnostic of all the old, obsolete commands in CupOf.java.
Display posts from previous:   
   Index -> Programming, Java -> Java Tutorials
View previous topic Tell A FriendPrintable versionDownload TopicRate TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 2 Posts ]
Jump to:   


Style:  
Search: