简体   繁体   中英

Eclipse - Just uninstalled Java 1.7 (still have Java 1.6 on my machine), but now Eclipse won't recognize any java stuff

I'm extremely confused about how to set up Java on Eclipse. I don't get how classpath/system variables/etc all works. I set my Java compiler settings from 1.7 to 1.6 after I uninstalled 1.7 (I still have 1.6). But it's still not working. Any help?

Open Eclipse. Follow Project => Properties => Java Build Path .

Come onto Libraries tab and on the right hand side you will see some buttons, click Add Library .

Select JRE System Library and click "Next" button. By clicking on Installed JREs button you will see the JREs that your Eclipse recognizes. If the JRE version is not visible there, you can use "Add" button to add a new JRE, and make sure you set the path of new JRE correctly. Sample path on my machine: C:\\Program Files (x86)\\Java\\jre6

可能您必须设置类路径: http : //javarevisited.blogspot.com/2011/01/how-classpath-work-in-java.html ,或者您只有JRE(没有JDK)吗?

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.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM