View Full Version : java: compile earlier jdk

January 11th, 2009, 11:36 PM

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?

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.

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

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.