Java 7 was released not so long ago, but 5 days before its release, several terrible errors were found in the hot loop optimization, which is enabled by default and causes the Java Virtual Machine to crash (at best).
These errors ([1], [2], [3]) were noticed by users and developers of Apache Lucene / Solr ([4], [5]). They were promised to be eliminated in Java 7 Update 2 ([6]). Note : these errors can also appear in Java 6 if one of the optimization flags is enabled: -XX:+OptimizeStringConcat or -XX:+AggressiveOpts for the JVM.
Bottom line: do not use Java 7 for anything, except when your program does not contain loops. ')