Old projects compatible with Java 7

后端 未结 5 1299
迷失自我
迷失自我 2021-02-14 01:38

My old projects use Java 6 (1.6), and I don\'t know when I update (Java 7), they can run fine ?

5条回答
  •  星月不相逢
    2021-02-14 02:18

    As was already stated backward compatibility is a very important aspect in new Java releases, so in general there should be no problems in switching to a newer Java version. In this case, however, Java 7 seems to have a few bugs in the new hotspot compiler optimizations. The Apache Software Foundation has issued a warning that their products Lucene and Solr are affected by these bugs.

    http://lucene.apache.org/#28+July+2011+-+WARNING%3A+Index+corruption+and+crashes+in+Apache+Lucene+Core+%2F+Apache+Solr+with+Java+7

    The affected loop optimizations can be switched off by starting java with -XX:-UseLoopPredicate.

提交回复
热议问题