Question

Does anybody know of a good approach for testing Java 6 code in Java 5? I just finished writing some programs for an internship application in Java 6, only to realize that they wanted me to submit code written in Java 5. I use eclipse, so I tried setting a duplicate project to run in a J2SE-1.5 environment and it worked. Was that a proper test, or was I mistaking something else for a Java 5? I also tried finding an online Java 5 compiler to test my code, but I couldn't find any websites with versions earlier than Java 6. I don't have a whole lot of experience with the more technical aspects of this sort of thing, so any simple approach would be immensely appreciated.

Was it helpful?

Solution

Yes, I think testing in a J2SE-1.5 environment should do it. Did you also change your compiler settings in the "Properties" window to 1.5? Please check that and try running your code. As far as I know I only do this to test between different versions of Java.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top