启动时,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
答案 0 :(得分:1)
按照@ greg-449的建议,我查看了“ eclipse.app/Contents/Eclipse/eclipse.ini” 文件,并添加了“-add-modules = ALL-SYSTEM “ -vmargs 行下方的行。并启动了scala IDE。