| RCP roduct Launch fails when defining "-configuration" switch [message #61374] | 
Wed, 13 May 2009 04:36   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Hello, 
 
when we define the "-configuration" switch as a program argument inside a  
product.launcher file, then the product fails to start (only) when  
launched from inside the eclipse IDE. 
 
Example: 
 
-data 
"@user.home/Client" 
-user 
"@user.home/Client" 
-configuration 
"@user.home/Client/configuration"   
 
The product creates the configuration area, but seems that it cannot  
locate it's runtime files: 
 
java.lang.IllegalStateException: Unable to acquire application service.  
Ensure that the org.eclipse.core.runtime bundle is resolved and started  
(see config.ini). 
	at  
 org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher .start(EclipseAppLauncher.java:74) 
	at  
 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:386) 
	at  
 org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:179) 
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) 
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) 
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) 
	at java.lang.reflect.Method.invoke(Unknown Source) 
	at  org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 549) 
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) 
	at org.eclipse.equinox.launcher.Main.run(Main.java:1236) 
	at org.eclipse.equinox.launcher.Main.main(Main.java:1212) 
 
 
If Product is being exported, then all runs fine - it does only not start  
when launched from inside eclipse. 
 
Tested with Eclipse 3.4.2 and Eclipse 3.5M6. 
 
Any help appreciated....
 |  
 |  
  | 
 | 
 | 
 | 
| Re: RCP roduct Launch fails when defining "-configuration" switch [message #597413 is a reply to message #61374] | 
Wed, 13 May 2009 14:12   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Rhodan76 wrote: 
> Hello, 
>  
> when we define the "-configuration" switch as a program argument inside  
> a product.launcher file, then the product fails to start (only) when  
> launched from inside the eclipse IDE. 
 
Ok. 
 
> If Product is being exported, then all runs fine - it does only not  
> start when launched from inside eclipse. 
>  
> Tested with Eclipse 3.4.2 and Eclipse 3.5M6. 
 
That error implies that core.runtime isn't started. 
 
Can you post your product definition here? That could help debug the issue. 
 
Cheers, 
 
Chris Aniszczyk | EclipseSource Austin | +1 860 839 2465 
http://twitter.com/eclipsesource | http://twitter.com/caniszczyk
 |  
 |  
  | 
| Re: RCP roduct Launch fails when defining "-configuration" switch [message #597516 is a reply to message #61560] | 
Fri, 15 May 2009 02:53   | 
 
Eclipse User  | 
 | 
 | 
   | 
 
Ok, no problem. Steps to reproduce: 
 
1. create the example HelloWorld RCP plugin 
2. create an product.launch configuration an configure it 
3. add -configuration switch to the programm arguments of the  
launch-configuration 
 
launch-configuration used in my example: 
 
<?xml version="1.0" encoding="UTF-8"?> 
<?pde version="3.4"?> 
 
<product name="Hello World" id="org.eclipse.rcp.hello.world.product"  
application="hello.world.application" version="1.0" useFeatures="false"> 
 
   <configIni use="default"> 
   </configIni> 
 
   <launcherArgs> 
      <programArgs>-configuration 
"@user.home/Hello World/config"</programArgs> 
      <vmArgsMac>-XstartOnFirstThread  
-Dorg.eclipse.swt.internal.carbon.smallFonts</vmArgsMac> 
   </launcherArgs> 
 
   <launcher> 
      <solaris/> 
      <win useIco="false"> 
         <bmp/> 
      </win> 
   </launcher> 
 
   <vm> 
   </vm> 
 
   <plugins> 
      <plugin id="com.ibm.icu"/> 
      <plugin id="org.eclipse.core.commands"/> 
      <plugin id="org.eclipse.core.contenttype"/> 
      <plugin id="org.eclipse.core.databinding"/> 
      <plugin id="org.eclipse.core.expressions"/> 
      <plugin id="org.eclipse.core.jobs"/> 
      <plugin id="org.eclipse.core.runtime"/> 
      <plugin id="org.eclipse.core.runtime.compatibility.registry"  
fragment="true"/> 
      <plugin id="org.eclipse.equinox.app"/> 
      <plugin id="org.eclipse.equinox.common"/> 
      <plugin id="org.eclipse.equinox.preferences"/> 
      <plugin id="org.eclipse.equinox.registry"/> 
      <plugin id="org.eclipse.help"/> 
      <plugin id="org.eclipse.jface"/> 
      <plugin id="org.eclipse.jface.databinding"/> 
      <plugin id="org.eclipse.osgi"/> 
      <plugin id="org.eclipse.rcp.hello.world"/> 
      <plugin id="org.eclipse.swt"/> 
      <plugin id="org.eclipse.swt.win32.win32.x86" fragment="true"/> 
      <plugin id="org.eclipse.ui"/> 
      <plugin id="org.eclipse.ui.workbench"/> 
   </plugins> 
 
</product> 
 
 
Resulting error message: 
 
!SESSION Fri May 15 08:32:54 CEST 2009  
----------------------------------------- 
!ENTRY org.eclipse.equinox.launcher 4 0 2009-05-15 08:32:54.087 
!MESSAGE Exception launching the Eclipse Platform: 
!STACK 
java.lang.ClassNotFoundException:  
org.eclipse.core.runtime.adaptor.EclipseStarter 
	at java.net.URLClassLoader$1.run(URLClassLoader.java:200) 
	at java.security.AccessController.doPrivileged(Native Method) 
	at java.net.URLClassLoader.findClass(URLClassLoader.java:188) 
	at java.lang.ClassLoader.loadClass(ClassLoader.java:307) 
	at java.lang.ClassLoader.loadClass(ClassLoader.java:252) 
	at  org.eclipse.equinox.launcher.Main.invokeFramework(Main.java: 546) 
	at org.eclipse.equinox.launcher.Main.basicRun(Main.java:504) 
	at org.eclipse.equinox.launcher.Main.run(Main.java:1236) 
	at org.eclipse.equinox.launcher.Main.main(Main.java:1212)
 |  
 |  
  | 
 | 
Powered by 
FUDForum. Page generated in 0.03864 seconds