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?
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 .
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.
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.
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).
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=...
.
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")); } }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With