Ajuda com Runtime

2 respostas
B

Boa tarde,

Na minha aplicação, preciso abrir atraves de um jButton um arquivo .jnlp por linha de comando mas não to conseguindo.. to tentando com esse código..
try {
            
            Runtime.getRuntime().exec("javaws http://192.168.0.48:8084/cpd/cpd.jnlp");

        } catch (IOException ex) {

            Logger.getLogger(FrameMod.class.getName()).log(Level.SEVERE, null, ex);
        }

Se alguém puder me ajudar,
valeu !

2 Respostas

renamed

Ve se ajuda ai irmao…

http://www.guj.com.br/posts/list/26357.java

B
30/10/2009 12:42:21 sistemamod.FrameMod btTIActionPerformed

SEVERE: null

java.io.IOException: Cannot run program rundll32: java.io.IOException: error=2, No such file or directory

at java.lang.ProcessBuilder.start(ProcessBuilder.java:459)

at java.lang.Runtime.exec(Runtime.java:593)

at java.lang.Runtime.exec(Runtime.java:431)

at java.lang.Runtime.exec(Runtime.java:328)

at sistemamod.FrameMod.btTIActionPerformed(FrameMod.java:536)

at sistemamod.FrameMod.access$200(FrameMod.java:30)

at sistemamod.FrameMod$1.actionPerformed(FrameMod.java:236)

at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)

at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)

at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)

at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)

at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)

at java.awt.Component.processMouseEvent(Component.java:6263)

at javax.swing.JComponent.processMouseEvent(JComponent.java:3267)

at java.awt.Component.processEvent(Component.java:6028)

at java.awt.Container.processEvent(Container.java:2041)

at java.awt.Component.dispatchEventImpl(Component.java:4630)

at java.awt.Container.dispatchEventImpl(Container.java:2099)

at java.awt.Component.dispatchEvent(Component.java:4460)

at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4574)

at java.awt.LightweightDispatcher.processMouseEvent(Container.java:4238)

at java.awt.LightweightDispatcher.dispatchEvent(Container.java:4168)

at java.awt.Container.dispatchEventImpl(Container.java:2085)

at java.awt.Window.dispatchEventImpl(Window.java:2475)

at java.awt.Component.dispatchEvent(Component.java:4460)

at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)

at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:269)

at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:184)

at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:174)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:169)

at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:161)

at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)

Caused by: java.io.IOException: java.io.IOException: error=2, No such file or directory

at java.lang.UNIXProcess.(UNIXProcess.java:148)

at java.lang.ProcessImpl.start(ProcessImpl.java:65)

at java.lang.ProcessBuilder.start(ProcessBuilder.java:452)

 31 more

esqueci de um detalhe: to usando linux ;s
já tinha visto esse tópico, mas gera esse erro ae

Criado 30 de outubro de 2009
Ultima resposta 30 de out. de 2009
Respostas 2
Participantes 2