0

每当我尝试启动我的应用程序(基于 Eclipse)时,都会出现以下错误

java.lang.IllegalStateException: Cannot change the location once it is set.
    at org.eclipse.core.runtime.internal.adaptor.BasicLocation.set(BasicLocation.java:142)
    at org.eclipse.core.runtime.internal.adaptor.BasicLocation.set(BasicLocation.java:137)
    at com.fiorano.studio.fmq.rcp.Application.start(Application.java:90)
    at org.eclipse.equinox.internal.app.EclipseAppHandle.run(EclipseAppHandle.java:196)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(EclipseAppLauncher.java:110)
    at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(EclipseAppLauncher.java:79)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:344)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:179)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.eclipse.equinox.launcher.Main.invokeFramework(Main.java:622)
    at org.eclipse.equinox.launcher.Main.basicRun(Main.java:577)
    at org.eclipse.equinox.launcher.Main.run(Main.java:1410)
    at org.eclipse.equinox.launcher.Main.main(Main.java:1386)

它要求我提供工作空间。当我选择一个并执行“确定”时。它只是关闭并抛出异常。我用谷歌搜索了它,但没有太多文档。有没有人遇到过这个问题?

4

1 回答 1

0

我搜索了一下,发现您需要在运行时配置中添加@noDefault 。但它已经在我的 .ini 文件中了。问题如下 -

我的配置文件如下

--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505
-showsplash
-showlocation
-data
–vm
/home/aniket/jdk1.7.0_11/bin
@noDefault
-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-Dosgi.requiredJavaVersion=1.5

我把它改成

--launcher.library
plugins/org.eclipse.equinox.launcher.gtk.linux.x86_64_1.1.100.v20110505
-showsplash
-showlocation
-data
@noDefault
–vm
/home/aniket/jdk1.7.0_11/bin
-vmargs
-Xms40m
-Xmx512m
-XX:MaxPermSize=256m
-Dosgi.requiredJavaVersion=1.5

-showsplash -showlocation -data它起作用了。我必须在指定之前和之前放置@noDefault

–vm
/home/aniket/jdk1.7.0_11/bin

我知道这听起来有点傻,我不确定确切的原因,但希望如果有人再次面临这种情况,这会有所帮助。

于 2013-09-25T06:31:57.380 回答