我在OS X Mountain Lion上安装了e(fx)clipse插件。当我启动eclipse时,我收到以下错误消息:
您没有使用Java7或Java8运行eclipse实例。 因此,JavaFX工具被禁用。 使Java7 / 8成为默认的系统java或调整你的eclipse.ini 传递-vm指向您的Java7 / 8安装。 如果您想关闭此检查,请打开您的首选项 并转到General>启动和关闭并取消选中 'JavaFX Tooling Java Check'
所以我检查了JAVA_HOME并将以下行添加到我的.profile
:
export JAVA_HOME=/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home
我的java现在是:
Kinnlas-MacBook:libexec kinnla$ java -version
java version "1.7.0_25"
Java(TM) SE Runtime Environment (build 1.7.0_25-b15)
Java HotSpot(TM) 64-Bit Server VM (build 23.25-b01, mixed mode)
但仍然有相同的错误消息。我还尝试修改我的eclipse.ini
:
-vm
/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk/Contents/Home/bin/java
这给了我另一条错误消息:
JVM共享库“/Library/Java/JavaVirtualMachines/jdk1.7.0_25.jdk” 不包含JNI_CreateJavaVM符号。
所以我回到原来的eclipse.ini
并尝试从shell启动eclipse:
java -jar /Applications/eclipse/plugins/org.eclipse.equinox.launcher_1.3.0.v20120522-1813.jar
启动失败,出现以下错误日志:
!SESSION 2013-07-20 14:42:49.845 -----------------------------------------------
eclipse.buildId=M20130204-1200
java.version=1.7.0_25
java.vendor=Oracle Corporation
BootLoader constants: OS=macosx, ARCH=x86_64, WS=cocoa, NL=en_US
!ENTRY org.eclipse.equinox.ds 4 0 2013-07-20 14:42:52.305
!MESSAGE [SCR] Exception while activating instance org.eclipse.e4.ui.css.swt.internal.theme.ThemeEngineManager@5b094702 of component org.eclipse.e4.ui.css.swt.theme
!STACK 0
java.lang.NoClassDefFoundError: org/eclipse/swt/widgets/Display
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2521)
at java.lang.Class.getDeclaredMethods(Class.java:1845)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.getMethod(ServiceComponent.java:126)
at org.eclipse.equinox.internal.ds.model.ServiceComponent.activate(ServiceComponent.java:213)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.activate(ServiceComponentProp.java:146)
at org.eclipse.equinox.internal.ds.model.ServiceComponentProp.build(ServiceComponentProp.java:345)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponent(InstanceProcess.java:620)
at org.eclipse.equinox.internal.ds.InstanceProcess.buildComponents(InstanceProcess.java:197)
at org.eclipse.equinox.internal.ds.Resolver.buildNewlySatisfied(Resolver.java:473)
at org.eclipse.equinox.internal.ds.Resolver.enableComponents(Resolver.java:217)
at org.eclipse.equinox.internal.ds.SCRManager.performWork(SCRManager.java:816)
at org.eclipse.equinox.internal.ds.SCRManager$QueuedJob.dispatch(SCRManager.java:783)
at org.eclipse.equinox.internal.ds.WorkThread.run(WorkThread.java:89)
at java.lang.Thread.run(Thread.java:724)
Caused by: java.lang.ClassNotFoundException: org.eclipse.swt.widgets.Display
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(BundleLoader.java:501)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:421)
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(BundleLoader.java:412)
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(DefaultClassLoader.java:107)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
... 15 more
任何线索? Thx提前!
答案 0 :(得分:1)
问题可能是os-x jdk 1.7.0_25-b15,eclipse Juno和e(fx)clipse插件之间不兼容。升级到日食开普勒解决了这个问题。