PDA

View Full Version : java: compile earlier jdk



andrew222
January 11th, 2009, 11:36 PM
Hello,

I am writing a program and using the LineItem class which I can't use with java 6 but can use with java 5, what is a command line that I can use to compile the code using java 5?

shadylookin
January 12th, 2009, 12:38 AM
if you're using eclipse you can set the compiler compliance level to 5.0

go to window -> preferences

then select java -> compiler and set compliance level to 1.5

that should do it.

andrew222
January 12th, 2009, 01:56 AM
Thank you very much....:-)

jespdj
January 12th, 2009, 01:39 PM
Why can't you use your class LineItem with Java 6? Do you get any error messages when you try to compile it? If so, then what are the error messages? Also, post your code.