What version of Java is running in Eclipse?

前端 未结 8 917
爱一瞬间的悲伤
爱一瞬间的悲伤 2020-12-24 12:33

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 Exp

8条回答
  •  忘掉有多难
    2020-12-24 13:05

    Eclipse uses the default Java on the system to run itself. This can also be changed in the eclipse.ini file in your eclipse install folder.

    To find out the version of java that your eclipse project is using, see Project->properties->build path->Libraries tab and see the JRE system library thats being used. You can also check it out at Window->Preferences->Java->Installed JREs. This is a list of all JREs that eclipse knows about

    To find out using code, use the System.getProperty(...) method. See http://java.sun.com/j2se/1.5.0/docs/api/java/lang/System.html#getProperties() for supported properties.

提交回复
热议问题