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?
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?
should return you a string along the lines of:
That's the version of Java that Eclipse is using to run your code which is not necessarily the same version that's being used to run Eclipse itself.
Under the help menu, there should be a menu item labeled "About Eclipse" I can't say with absolute precision because I'm using STS which is the same thing but my label is different.
In the dialog box that opens after you click the relevant about menu item there should be an installation details button in the lower left hand corner.
The version of Java that you're running Eclipse against ought to be in "System properties:" under the "Configuration" tab.