[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.newcomer] Re: Compiling for older version of java

I may be missing something, so I apologize if that is the case. In my limited experience, (a) you shouldn't need to install the 1.5 JRE or JDK to compile with a lower compliance level; (b) if you compile with a compliance level that is too low for the classes being compiled, you do get compiler errors; and (c) you do need to compile with a lower compliance level to run on a lower level JRE.

I have a small test project that uses generics, so it requires 1.5. If I change the compiler compliance to 1.4, it doesn't compile. I have 1.6 on my Windows machine and 1.5 on my Linux machine. If I compile at the default 1.6 compliance level on Windows, it won't run on my Linux machine. If I recompile with 1.5 on Windows, it does run on the Linux machine. I did not need to install 1.5 on my Windows machine.

So I think that is how it is supposed to work. Why it is not working in this case I don't know. I have done this with Eclipse 3.3.0 but not with 3.3.1. Hope this helps. Mark

Mark,

That's exactly how I suspected it was supposed to work, but have not witnessed it. I first tried in Eclipse version 3.3.0 before upgrading to version 3.3.1.

Perhaps you could try a specific test for me. I have modified JChessBoard (http://jchessboard.sourceforge.net/) to work over Skype by combining it with Skype4Java to have a cross platform p2p chess program - and it works quite well. When I could not make my jar run on Mac (because Java 6 is not on Mac yet) is when I tried setting the Compiler Compliance level to 5. When that still didn't work, I tried simplifying the problem and only compiling the original JChessBoard source without the Skype4Java modules or any of my code.

Do you think you could try to compile JChessBoard on your Java 1.6 Windows machine and try to run it on your Java 1.5 Linux box?

Thanks,

--Joel