Is the JDK7 safe to use now?

I recently found out that there are bugs in JDK7 to optimize the hotspot compiler. See this stream .

I don't quite understand the details of these errors, but they seem to be related to loop optimization. Since I am going to run some large-scale program in the -server mode (which, of course, contains many cycles), I wonder if it is possible to use JDK7 or not? Thanks.

+7
source share
2 answers

The same error exists in JDK 6, but since the optimization is different by default, it only comes into play when using aggressive optimization flags.

To disable this optimization for JDK 7, use the -XX: -UseLoopPredicate flag and you will be safe in any version of JDK 7.

+6
source

Now you should start testing your code with JDK7.

As for whether you want to include it in production, you can probably always wait some time. This applies not only to the JDK, but also to any major upgrade of any core software. Let them do update1 and update2, and expect what Apache and others have to say for this. You don't have to rush, do you? JDK6 is working ...

+3
source

All Articles