I am running Eclipse Juno (so that I can still run EclEmma) and have jdk 1.6.0_45 installed. I used to have jre 1.6 installed, but then whenever I would re-import from my maven poms I'd lose all debug information in the libraries, so I've switched.
Every so often, and I haven't yet figured out what triggers it, all of my projects (and there are over 100, so it's a pain to fix them all) decide that they need a 1.6 jre and that none is available. I can see jdk1.6.0_45 in the Installed JREs list, but it's not available in the Execution Environment pane under JavaSE-1.6 . The only solution I've found so far is to edit all the .project files so that they refer to JaveaSE-1.6/JRE_CONTAINER again and restart Eclipse. This takes nearly an hour (because it needs to rebuild everything twice) which is a large loss of time in a day.
So the question I have is, is there any way to force Eclipse to see that the JDK that it is running in is a valid JavaSE-1.6 environment?
Déclare your JRE in Window > Preferences > Java > Installed JREs (seems already done)
In Installed JREs > Execution Environments > JavaSE-1.6, check the JRE you want (jdk1.6.0_45)
Now all your projects need to have the JRE System Library using an execution environment JavaSE-1.6 (You should see your jre name next to it).
您需要转到Windows->首选项-> Java->已安装的JREs->执行环境,然后在左栏中选择JavaSE-1.6,并将您的jdk1.6.0_45标记为兼容。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.