从命令行运行Eclipse RCP应用程序时出错

时间:2014-09-22 06:21:08

标签: eclipse eclipse-plugin osgi eclipse-rcp

我有一个eclipse插件,我想从命令行运行而不启动eclipse。我使用OSGi命令实现了这一点:

/Library/Java/JavaVirtualMachines/jdk1.7.0_60.jdk/Contents/Home/bin/java 
  -XstartOnFirstThread
  -Dosgi.requiredJavaVersion=1.5
  -XX:MaxPermSize=256m
  -Xms40m
  -Xmx512m
  -Declipse.ignoreApp=false
  -Dosgi.noShutdown=true    
  -Declipse.pde.launch=true
  -Dfile.encoding=MacRoman
  "-Xbootclasspath/p:/Users/aneeshmohan/Movies/eclipse Indigo/plugins/org.eclipse.jdt.debug_3.7.1.v20110802_r371/jdi.jar" 
  -classpath "/Users/aneeshmohan/Movies/eclipse Indigo/plugins/org.eclipse.equinox.launcher_1.2.0.v20110502.jar"
  org.eclipse.equinox.launcher.Main
  -product org.talend.rcp.branding.tos.product 
  -data /Users/aneeshmohan/Desktop/MyWorkspace/../runtime-NewTalendCofiguration 
  -configuration file:/Users/aneeshmohan/Desktop/MyWorkspace/.metadata/.plugins/org.eclipse.pde.core/NewTalendCofiguration/ 
  -dev file:/Users/aneeshmohan/Desktop/MyWorkspace/.metadata/.plugins/org.eclipse.pde.core/NewTalendCofiguration/dev.properties 
  -os macosx 
  -ws cocoa 
  -arch x86_64 
  -nl en_US 
  -consoleLog 
  -console 
  -nosplash 
  --disableLoginDialog

这没有问题。 我现在将我的eclipse和工作区复制到另一台机器并对路径进行了必要的更改,但是当我运行它时,我得到osgi控制台但最终得到错误:

!MESSAGE Error loading bundle datas.  Recalculating cache.
!STACK 0
java.lang.NullPointerException
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.getExtensionFiles(BaseStorage.java:1163)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.addExtensionContent(BaseStorage.java:1087)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.processFrameworkExtension(BaseStorage.java:1060)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.processExtension(BaseStorage.java:1026)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.readBundleDatas(BaseStorage.java:406)
    at org.eclipse.osgi.internal.baseadaptor.BaseStorage.getInstalledBundles(BaseStorage.java:354)
    at org.eclipse.osgi.baseadaptor.BaseAdaptor.getInstalledBundles(BaseAdaptor.java:179)
    at org.eclipse.osgi.framework.internal.core.Framework.initialize(Framework.java:236)
    at org.eclipse.osgi.framework.internal.core.Framework.<init>(Framework.java:162)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(EclipseStarter.java:261)
    at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseStarter.java:175)
    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:606)
    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)

有人能指出我正确的方向来解决这个错误吗?

1 个答案:

答案 0 :(得分:0)

猜测:我看到你正在尝试使用Windows路径在Mac上盯着你的东西。您可以在路径中使用空格和引号。首先,我会尝试使用&#34; safe&#34;没有空格的路径。