How to use Java11 (Java10) with Eclipse Plugin?

后端 未结 3 1017
遇见更好的自我
遇见更好的自我 2021-01-02 11:26

If I specify JavaSE-10 as minimum execution environment in my Eclipse plugin:

I get following errors when starting my plugin as Eclipse Application:

3条回答
  •  走了就别回头了
    2021-01-02 11:49

    It looks like Eclipse OSGi does not support Java SE 10 yet. I downloaded the latest Eclipse Oxygen 4.7.3a and opened plugins/org.eclipse.osgi_3.12.100.v20180210-1608.jar. The last supported profile was JavaSE-9.

    So, you have two choices here:

    • Wait until OSGi officially supports JavaSE-10 profile.
    • If you really want to write a plugin with Java 10 and you have control over the plugins folder (e.g. you develop an Eclipse RCP application), open the OSGI jar and add a new profile JavaSE-10. To do this, you can copy JavaSE-9.profile to JavaSE-10.profile and fix corresponding lines in the new file. Also, you must add a new line to profile.list.

提交回复
热议问题