I am switching an enterprise application built on Spring 3.1.0, Hibernate 3.6.0 from Java 6 32bit to Java 7 64 bit. Has anybody done that? Any problems? Are there any resources on the subject?
Asked
Active
Viewed 2,915 times
8
-
1The best thing to do would be to switch then compare your two versions under the same test environment. – Hunter McMillen May 31 '12 at 12:39
-
1Just found this (a bit old) question: http://stackoverflow.com/questions/6870753/old-projects-compatible-with-java-7 – AndreyKo May 31 '12 at 13:19
2 Answers
8
Here are the pitfalls I know about:
- You might have to upgrade your IDE to be able to enable Java 7 features.
- Make sure that command line tools and your IDE use the same Java version. If you're using Maven, for example, look into
$HOME/.mavenrc
and/or check the environment variableJAVA_HOME
- Check the source/target options of the Java compiler.
- Java 7 supports generics better than Java 6 so some code will now compile that failed with Java 6
- The 64bit version of Java uses a lot more memory than the 32bit version
- The first release of Java 7 had a severe bug in the JIT compiler which broke Lucene. Use at least b2 or better.

Aaron Digulla
- 321,842
- 108
- 597
- 820
6
Java 7 uses the newer JAXB 2.2 instead of 2.1 (the full change on the XML stack is described here). These versions are not compatible on generated code for Boolean getters and setters!

Arne Burmeister
- 20,046
- 8
- 53
- 94