Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [eclipse-dev] IPlatformRunnable Depprecated, what is the recommended approach for Headless Jar execution?

It looks like you have an old style Eclipse 2.0 plugin org.wso2.developerstudio.eclipse.test.p2.hierarchy.  I suggest you convert this to a proper OSGi bundle.  Otherwise you are going to have to install the compatibility bundle org.eclipse.osgi.compatibility.plugins.  You can find this on the eclipse project update site for 4.5 (http://download.eclipse.org/eclipse/updates/4.5).  Search for "Eclipse 2.0 Style Plugin Support"

Tom





From:        Awanthika Senarath <wnthksnrth@xxxxxxxxx>
To:        "General development mailing list of the Eclipse project." <eclipse-dev@xxxxxxxxxxx>
Date:        05/20/2016 07:30 AM
Subject:        Re: [eclipse-dev] IPlatformRunnable Depprecated, what is the recommended approach for Headless Jar execution?
Sent by:        eclipse-dev-bounces@xxxxxxxxxxx




Thanks Thomas,

I was able to run the application in headless mode accessing the args with the following way,

Map<String, Object> contextArguments = arg0.getArguments();
String [] cmdArgs = (String[]) contextArguments.get(IApplicationContext.APPLICATION_ARGS);

But now I'm getting an exception logged on starting the application,

[1] java.lang.RuntimeException: Unable to aquire PluginConverter service during generation for: /home/awanthika/WSO2/DeveloperStudio/mars/eclipse-mars/eclipse/plugins/org.wso2.developerstudio.eclipse.test.p2.hierarchy_4.2.0.201605191638.jar
at org.eclipse.equinox.internal.frameworkadmin.utils.Utils.convertPluginManifest(Utils.java:154)
at org.eclipse.equinox.internal.frameworkadmin.utils.Utils.basicLoadManifest(Utils.java:82)
at org.eclipse.equinox.internal.frameworkadmin.utils.Utils.getOSGiManifest(Utils.java:217)
at org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxBundlesState.installBundle(EquinoxBundlesState.java:556)
at org.eclipse.equinox.internal.simpleconfigurator.manipulator.SimpleConfiguratorManipulatorImpl.updateBundles(SimpleConfiguratorManipulatorImpl.java:560)


Regards
Awanthika

On Thu, May 19, 2016 at 7:18 PM, Thomas Watson <tjwatson@xxxxxxxxxx> wrote:
Which example are you using?  The first one using e4 stuff so it would start the eclipse workbench.  Your RunHeadlessMode application should look almost identical to when it implemented IPlatformRunnable.  The only difference is that you implement a start method instead of a run method and you get the Object args by calling:

IApplicationContext.getArguments().get(.IApplicationContext.APPLICATION_ARGS)

Tom





From:        
Awanthika Senarath <wnthksnrth@xxxxxxxxx>
To:        
"General development mailing list of the Eclipse project." <eclipse-dev@xxxxxxxxxxx>
Date:        
05/19/2016 07:55 AM
Subject:        
[eclipse-dev] IPlatformRunnable Depprecated, what is the recommended approach for Headless Jar execution?
Sent by:        
eclipse-dev-bounces@xxxxxxxxxxx





Hello all,

I have implemented plugin that needs to be run in headless mode in the remote machine. I have implemented this using the extension point [1] with implementation of IPlatformRunnable class.

But that method appears deprecated according to [2]. I tried using IApplicationServer start method following the code samples at [3], but it seems that it cannot be run in headless mode as when I executed the jar in my local machine it started an eclipse instance.

Could you please let me know the recommended approach for $subject.


[1] <extension id="org.eclipse.core.runtime.applications" point="org.eclipse.core.runtime.applications"> 
      <application> 
         <run class="org.wso2.developerstudio.eclipse.test.p2.hierarchy.RunHeadlessMode"> 
            <parameter name="optimize" value="true"/> 
         </run> 
      </application> 
   </extension> 

[2]
http://help.eclipse.org/luna/index.jsp?topic=%2Forg.eclipse.platform.doc.isv%2Freference%2Fapi%2Forg%2Feclipse%2Fcore%2Fruntime%2FIPlatformRunnable.html

[3] 
http://www.programcreek.com/java-api-examples/org.eclipse.equinox.app.IApplicationContext


Regards

Awanthika Senarath
Software Engineer
WSO2 Inc,

_______________________________________________
eclipse-dev mailing list

eclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/eclipse-dev



_______________________________________________
eclipse-dev mailing list

eclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit

https://dev.eclipse.org/mailman/listinfo/eclipse-dev



--
------------------------------------------------------------------------------------------->>
Awanthika Senarath

Software Engineer
WSO2 Inc,
_______________________________________________
eclipse-dev mailing list
eclipse-dev@xxxxxxxxxxx
To change your delivery options, retrieve your password, or unsubscribe from this list, visit
https://dev.eclipse.org/mailman/listinfo/eclipse-dev



Back to the top