mogli
mogli

Reputation: 1609

Launching another java application fails from java web start

As, it is easy to download jars and other artifacts using http://code.google.com/p/jnlpdownloader/

So, I am trying to execute my business application from a small launcher application(this launcher application is running as Java web start application).

This launcher application,

But, the following code doesn't seems to work, nor, it is throwing any exceptions

String[] command = {"java -jar", "JarFromURL.jar"};
        Runtime r = Runtime.getRuntime();
        try {
            r.exec(command);
        } catch (IOException e1) {

            JOptionPane.showMessageDialog(null, "Voilla...") ;
        }

Upvotes: 0

Views: 609

Answers (1)

h3xStream
h3xStream

Reputation: 6631

The array of parameters passed to exec() should be split this way.

String[] command = {"java", "-jar", "JarFromURL.jar"};

Upvotes: 1

Related Questions