简体   繁体   中英

How to update Eclipse to use the updated version of Java?

So on my computer i have Java 8 downloaded and when i check java preferences i am given the upload path and location. But since my Eclipse is still runing on Java 6 i wanted to update it to Java 8. So i went to Eclipse preferences then java preferences then clicked on Installed JREs. And I pressed add, then standard vm and for the jre home i put /Library/Internet Plug-Ins/(Etc) until it was all pasted. but the box still says "Target is not a JDK Root. Java executable was not found". Is there some step that i did was wrong, or whats the proper way to do it? Thanks so much in advance

Windows computer you need to update from java directly. Normally an icon would tell you to update. Or you can install java 8

Step by step:

Download and Install

This process requires you to download an executable file that includes all the files needed for the complete installation. You do not need to remain connected to the Internet during the installation. The file can also be copied to a computer that is not connected to the Internet.

Go to the Manual download page Click on Windows Offline. The File Download dialog box appears prompting you to run or save the download file Click Save to download the file to your local system. Tip: Save the file to a known location on your computer, for example, to your desktop. Close all applications including the browser. Double-click on the saved file to start the installation process. The installation process starts. Click the Install button to accept the license terms and to continue with the installation.

Now to point java to system path variable:

Select Computer from the Start menu Choose System Properties from the context menu Click Advanced system settings > Advanced tab Click on Environment Variables, under System Variables, find PATH, and click on it. In the Edit windows, modify PATH by adding the location of the class to the value for PATH. If you do not have the item PATH, you may select to add a new variable and add PATH as the name and the location of the class as the value. Reopen Command prompt window, and run your java code.

And after that eclipse should be able to detect it automatically

The download from java.com which installs in /Library/Internet Plug-Ins is only the JRE, for development you probably want to download the JDK from http://www.oracle.com/technetwork/java/javase/downloads/index.html and install that instead. This will install the JDK at /Library/Java/JavaVirtualMachines/jdk1.7.0_.jdk/Contents/Home which you can then add to Eclipse via Preferences -> Java -> Installed JREs.

Learned after research it should help

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