Scala IDE 启动时抛出错误

Scala IDE throwing error whens starting up

Scala IDE 启动时抛出错误。我已尝试找到解决此问题的方法,但无济于事。

我试过的解决方法

正在尝试更改 java 安装的版本

我已经尝试了所有 7,8,9,10 版本的 Java 以及 Mac.

的关闭

我也升级了SBT版本-->没有成功。

已尝试删除 .metadata 目录--> 未成功

我使用的软件版本

sbt -> 1.1.6

Scala -> Scala 编译器版本 2.12.6

编辑:在日志文件中发布缩写内容

BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_IN
Framework arguments:  -keyring /Users/.eclipse_keyring
Command-line arguments:  -os macosx -ws cocoa -arch x86_64 -keyring /Users/utkarshrathor/.eclipse_keyring

!ENTRY org.eclipse.osgi 4 0 2018-07-18 10:12:52.810
!MESSAGE Application error
!STACK 1
org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct

.
.
.

Caused by: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct

..

Caused by: java.lang.ClassNotFoundException: javax.annotation.PostConstruct cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418

..
..

!ENTRY org.eclipse.e4.ui.workbench 4 0 2018-07-18 10:12:52.820
!MESSAGE FrameworkEvent ERROR
!STACK 0
java.lang.NoClassDefFoundError: javax/annotation/PreDestroy

..
..

Caused by: java.lang.ClassNotFoundException: javax.annotation.PreDestroy cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418

..
..

org.eclipse.e4.core.di.InjectionException: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct

..
..

Caused by: java.lang.NoClassDefFoundError: javax/annotation/PostConstruct

..
..

Caused by: java.lang.ClassNotFoundException: javax.annotation.PostConstruct cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418

..
.

java.lang.NoClassDefFoundError: javax/annotation/PreDestroy

..

Caused by: java.lang.ClassNotFoundException: javax.annotation.PreDestroy cannot be found by org.eclipse.e4.core.di_1.6.100.v20170421-1418

根据@greg-449 的建议,我查看了 "eclipse.app/Contents/Eclipse/eclipse.ini" 文件并添加了 "--add-modules=ALL-SYSTEM" 行低于 -vmargs 行。它启动了 Scala IDE。

这个答案也对我有帮助