程序无法启动。我切换到 Java 8,但没有用。谢谢你的帮助。
!SESSION 2021-01-30 23:21:09.470 -----------------------------------------------
eclipse.buildId=unknown
java.version=1.8.0_275
java.vendor=Private Build
BootLoader constants: OS=linux, ARCH=x86_64, WS=gtk, NL=de_DE
Command-line arguments: -os linux -ws gtk -arch x86_64
!ENTRY org.eclipse.e4.ui.bindings 4 0 2021-01-30 23:21:10.218
!MESSAGE FrameworkEvent ERROR
!STACK 0
org.osgi.framework.BundleException: Could not resolve module: org.eclipse.e4.ui.bindings [160]
Unresolved requirement: Import-Package: org.eclipse.e4.core.commands.internal
-> Export-Package: org.eclipse.e4.core.commands.internal; bundle-symbolic-name="org.eclipse.e4.core.commands"; bundle-version="0.13.0.v20201119-1132"; version="0.0.0"; x-friends:="org.eclipse.e4.ui.bindings,org.eclipse.ui.workbench"
org.eclipse.e4.core.commands [112]
Unresolved requirement: Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))"
Unresolved requirement: Import-Package: org.eclipse.e4.core.commands
-> Export-Package: org.eclipse.e4.core.commands; bundle-symbolic-name="org.eclipse.e4.core.commands"; bundle-version="0.13.0.v20201119-1132"; version="0.0.0"; x-friends:="org.eclipse.e4.ui.bindings, org.eclipse.e4.ui.workbench, org.eclipse.e4.ui.workbench.renderers.swt, org.eclipse.ui.workbench, org.eclipse.e4.ui.workbench.swt, org.eclipse.e4.ui.progress, org.eclipse.e4.core.commands.tests"
at org.eclipse.osgi.container.Module.start(Module.java:463)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel$2.run(ModuleContainer.java:1845)
at org.eclipse.osgi.internal.framework.EquinoxContainerAdaptor$1$1.execute(EquinoxContainerAdaptor.java:136)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1838)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.incStartLevel(ModuleContainer.java:1779)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.doContainerStartLevel(ModuleContainer.java:1743)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1665)
at org.eclipse.osgi.container.ModuleContainer$ContainerStartLevel.dispatchEvent(ModuleContainer.java:1)
at org.eclipse.osgi.framework.eventmgr.EventManager.dispatchEvent(EventManager.java:234)
at org.eclipse.osgi.framework.eventmgr.EventManager$EventThread.run(EventManager.java:345)
答案1
错误消息表明程序需要 Java 11:,Require-Capability: osgi.ee; filter:="(&(osgi.ee=JavaSE)(version=11))
但您的问题表明您当前正在使用 Java 8。要在 Ubuntu 18.04 及更高版本中安装 Java 11,请打开终端并输入:
sudo apt install openjdk-11-jdk
您可以同时安装多个 Java 版本,并使用 设置默认 Java 版本update-java-alternatives
。
$更新 Java 替代方案 用法:update-java-alternatives [--jre-headless] [--jre] [--plugin] [-v|--verbose] -l|--列表 [<jname>] -s|--set <jname> -a|--自动 -h|-?|--帮助