Ticket #71 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

Osgi launching from IDE

Reported by: dumoulin Owned by: dumoulin
Priority: high Milestone: 0.2
Component: ui.graphical Version:
Severity: blocker Keywords:
Cc:

Description

An exploration application needs an OSGI runtime to be executed. But, for instance, it isn't possible to launch such an application from outside this runtime, and from the SimExplorer IDE, or from outside Eclipse (with Equinox runtime) to make tests.

  1. The first solution is to run the Equinox by a system call, and communicate through input/output stream.
  2. A second solution could be to call the equinox launcher since the JVM runtime. See EclipseStarter

Change History

Changed 3 years ago by dumoulin

  • owner set to romain.reuillon

Changed 3 years ago by thierry

  • milestone set to 0.2

Changed 3 years ago by dumoulin

  • component changed from ide.core to ide.gui

Changed 3 years ago by dumoulin

  • owner changed from romain.reuillon to dumoulin
  • status changed from new to assigned

Changed 3 years ago by dumoulin

Changed 3 years ago by dumoulin

I've tried with the EclipseStarter class :

BundleContext bundleContext = EclipseStarter.startup(new String[] {"-console","1234","-noExit","local", "file:///home/dumoulin/design.jar"}, null);
bundleContext.installBundle("file://"+root+"/plugins/com.jcraft.jsch_0.1.37.v200803061811.jar");
bundleContext.installBundle("file://"+root+"/plugins/org.simexplorer.core_1.0.0.jar");
System.out.println(bundleContext.getBundle().getSymbolicName());
bundleContext.getBundle().start();

but the bundles doesn't seem to be loaded. So finally, I use the class org.eclipse.equinox.launcher.Main :

        System.setProperty("osgi.configuration.area", root + "/configuration");
        System.setProperty("osgi.install.area", root);
        File logFile = new File(root + "/equinox.log");
        logFile.delete();
        System.setProperty("osgi.logfile", logFile.getAbsolutePath());

        new Main().run(new String[]{"local", "file:///home/dumoulin/design.jar"});

Changed 3 years ago by dumoulin

  • status changed from assigned to closed
  • resolution set to fixed

Fixed with r1810 and the class SimExplorerRuntimeProxy. See also the test class.

Note: See TracTickets for help on using tickets.

logo cemagref

logo iscpif

logo lifegrid

logo region auvergne

logo patres project