Executando Help

4 respostas
W

E ae galera …

Seguinte … to com um problema aki … tipo … preciso quando o kra a pertar o botão, executtr um arquivo de help … to tentando dessa forma … m as ta dando pau …

Runtime.getRuntime().exec("myHelp.chm");

A seguinte exception eh gerada

java.io.IOException: CreateProcess: myHelp.chm error=193
	at java.lang.ProcessImpl.create(Native Method)
	at java.lang.ProcessImpl.<init>(Unknown Source)
	at java.lang.ProcessImpl.start(Unknown Source)
	at java.lang.ProcessBuilder.start(Unknown Source)
	at java.lang.Runtime.exec(Unknown Source)
	at java.lang.Runtime.exec(Unknown Source)
	at java.lang.Runtime.exec(Unknown Source)
	at teste.MainTest.main(MainTest.java:30)

…???[/code]

4 Respostas

M

Voce ta colocando isso dentro de um try/ catch ? tenta assim…

try { Runtime.getRuntime().exec("c:/minhaPasta/myHelp.chm"); } catch (IOException e) {}

W

kra num quer dar certo naum … 8O 8O 8O

to tentando assim … como vc disse …

try {
Runtime.getRuntime().exec("C:/myHelp.chm");
} catch (IOException e) {
// TODO Auto-generated catch block
e.printStackTrace();
}
M

:grin: :grin: :grin: :grin: :grin:

Runtime.getRuntime().exec("hh.exe c:\meuDIretorio\myHelp.chm");
W

Consegui kra … valeu ae !!!

Process p=Runtime.getRuntime().exec("cmd /c myHelp.chm");

:grin: :grin: :grin:

Criado 14 de agosto de 2005
Ultima resposta 15 de ago. de 2005
Respostas 4
Participantes 2