File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JNLP and Web Start and the fly likes Launch JNLP within application Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » JNLP and Web Start
Bookmark "Launch JNLP within application" Watch "Launch JNLP within application" New topic
Author

Launch JNLP within application

Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329
I'm trying to launch another JNLP file from within an application that was deployed via webstart.
I use the following Command:

Runtime.getRuntime().exec("myfile.jnlp");

and get the following error:
java.io.IOException: CreateProcess: c:\testing\launchNewWindow.jnlp error=193
at java.lang.Win32Process.create(Native Method)
at java.lang.Win32Process.<init>(Win32Process.java:61)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:546)
at java.lang.Runtime.exec(Runtime.java:413)
at java.lang.Runtime.exec(Runtime.java:356)
at java.lang.Runtime.exec(Runtime.java:320)
at TestVM$1.actionPerformed(TestVM.java:33)
at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1445)
at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(AbstractButton.java:1499)
at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:373)
at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:245)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:211)
at java.awt.Component.processMouseEvent(Component.java:3710)
at java.awt.Component.processEvent(Component.java:3539)
at java.awt.Container.processEvent(Container.java:1159)
at java.awt.Component.dispatchEventImpl(Component.java:2588)
at java.awt.Container.dispatchEventImpl(Container.java:1208)
at java.awt.Component.dispatchEvent(Component.java:2492)
at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:2446)
at java.awt.LightweightDispatcher.processMouseEvent(Container.java:2211)
at java.awt.LightweightDispatcher.dispatchEvent(Container.java:2120)
at java.awt.Container.dispatchEventImpl(Container.java:1195)
at java.awt.Window.dispatchEventImpl(Window.java:923)
at java.awt.Component.dispatchEvent(Component.java:2492)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:334)
at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchThread.java:126)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:93)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:88)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:80)

Does anyone know why this is happening? I even tried using the absolute path to the file and I keep getting the same error. Is there anyway that I can find out what error 193 is?
Maulin Vasavada
Ranch Hand

Joined: Nov 04, 2001
Posts: 1871
hi Ronnie
jnlp file can be just executed from the prompt by typing the name as its not a program/executable.
we need "javaws" to run it.
i tried following from my computer,

it worked for me. here, draw.jnlp is the SUN's Draw application.
tho u'll have to resolve path issues etc to see if u can run "javaws" as just "javaws" to avoid system dependencies etc...
regards
maulin
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Launch JNLP within application