Email this to a friend
 
You can compile for older versions of the JRE by setting the compiler target compliance level. This allows you to generate class files that are usable on older versions of the JRE as well as the current one.

From your IDE, you will be able to select the compliance level, but if you're compiling manually using javac, this can be done by setting the appropiate command line parameters: -source and -target.

For example, to compile for JRE 1.6, do this:

javac -source 1.6 -target 1.6 MyClass.java

A quick explanation:

-source sets the source compatibility to the specified version, and ensures that your code is usable on the specified JRE.

-target specifies the compliance level o  ...

Send a link to this post to yourself or a friend.

Send to e-mail:
Your name:
Your e-mail:
Captcha:
Type the letters and numbers as shown.
/get/captcha/1710829682
Not readable? Get another.
 
Information entered is solely used for sending a one-time e-mail, and is not retained and/or passed on to a third party.
 
 
 
 
« March 2024»
SunMonTueWedThuFriSat
     12
3456789
10111213141516
17181920212223
24252627282930
31      
 
Links
 
Quote
« I needed a password with eight characters so I picked Snow White and the Seven Dwarves. »