Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What version of Java is running in Eclipse?

How do I know what version of Java is being run in Eclipse?

Is there a way to write code to find out?

Is "JRE System Library [JavaSE-1.6]" in "Package Explorer" the right version?

like image 609
Devoted Avatar asked Dec 22 '09 06:12

Devoted


People also ask

How do I check my Java version in Eclipse?

To check with what Java version (JRE or JDK) Eclipse is running, do the following: Open the menu item Help > About Eclipse . (On the Mac, it's in the Eclipse-menu, not the Help-menu) Click on Installation Details .

Where is the Java version set in Eclipse?

Click on the Window tab in Eclipse, go to Preferences and when that window comes up, go to Java → Installed JREs → Execution Environment and choose JavaSE-1.5.

How do I check my current Java version?

The Java version can be found in the Java Control Panel. Under the General tab in the Java Control Panel, the version is available through the About section. A dialog appears (after clicking About) showing the Java version.

Does Eclipse run Java 8?

Eclipse requires Java 11 to run, but supports also older versions (starting with Java 1.1, up to Java 15, and of course Java 8).


Video Answer


2 Answers

If you want to check if your -vm eclipse.ini option worked correctly you can use this to see under what JVM the IDE itself runs: menu Help > About Eclipse > Installation Details > Configuration tab. Locate the line that says: java.runtime.version=....

like image 148
Oliver Avatar answered Oct 06 '22 05:10

Oliver


The one the eclipse run in is the default java installed in the system (unless set specifically in the eclipse.ini file, use the -vm option). You can of course add more Java runtimes and use them for your projects

The string you've written is the right one, but it is specific to your environment. If you want to know the exact update then run the following code:

public class JavaVersion {   public static void main(String[] args) {     System.out.println(System.getProperty("java.runtime.version"));   } } 
like image 39
David Rabinowitz Avatar answered Oct 06 '22 03:10

David Rabinowitz