Question

I couldn't find an answer to this so I decided to post the question:

I have a legacy java 6 application running in Tomcat 6 currently being compiled using the latest JDK 6 (rev 45). We are about to add some Scala (2.10.3) modules (which will depend on the java ones) and I am wondering if it's worth upgrading to the JDK 7 compiler and what the possible risks are.

I am also wondering if it might be better to just bite the bullet and switch to java 7 although we might need to migrate to Tomcat 7 or other container.

Or we'll just wait for java 8!

Was it helpful?

Solution

As far as generics are concerned there are some risks to compile java-6-files with a JDK-7-compiler. Some classes might not compile while some generics constructions which were not possible in Java 6 will now be compilable in a JDK-7 compiler.

So indeed there are some incompatibilities. Please study:

Oracle compatibility note

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