Hi!
I have an application/bundle that has a GUI. I use pax-runner to launch
  equinox and execute that application. If I run pax-runner from the command
  line (using pax-run.bat in Windows) and use the "executor=inProcess"
option,
  then my application starts up as expected. However, if Iinvoke pax-run.bat
  (with "executor=inProcess") as a new process from within a java program
  (using ProcessBuilder) the GUI of my application does not pop up. I have
to
  kill the launching application for the GUI of my application to pop up.
  Moreover, if I do not use the "executor=inProcess" option and execute
  pax-run from the command line, then the GUI does not pop up and I have to
  press a key for it to pop up (but it becomes irresponsive).
  If I launch my application w/o pax-runner (i.e. as a standalone java
  application not running inside an osgi container), no matter how I launch
  it, it works ok.
  The application I mention above is somehow complex, so in order to be sure
  that the problem is not with my particular application, but it is a
general
  problem of pax-runner + Swing, I wrote a simple program:
  public class HelloWorld implements BundleActivator {
  public void start(BundleContext c) {
  System.out.println("Hello");
  ...
  JPanel authenticationComponents = new JPanel(new GridLayout(2, 2));
  ....
  JPanel infoPanel = new JPanel();
  ...
  JOptionPane.showConfirmDialog(null, new JComponent[] { infoPanel,
  authenticationComponents }, "Dialog", JOptionPane.OK_CANCEL_OPTION);
  }

  public void stop(BundleContext c) {
  System.out.println("Goodbye World");
  }
  }

  If I execute it with pax runner and "executor=inProcess", the HelloWorld
  bundle is started and the dialog is shown. However, w/o the
  "executor=inProcess" option, the bundleremains in state STARTING and the
  dialog is not shown.
  Any idea of why this is happening andhow to solve this problem?
  Thanks,
  Humberto
_______________________________________________
general mailing list
general@lists.ops4j.org
http://lists.ops4j.org/mailman/listinfo/general

Reply via email to