Need help writing java program to start QNX programs

Hello,

I am trying to write a java program that will start up pterm (the qnx
terminal screen). For some reason, this code doesn’t work on QNX, but when i
try to run notepad.exe on widndows instead, it works. Please help me out.
Thanks

Runtime rt = Runtime.getRuntime();
String cmd = “ped”;
try {
Process pro = rt.exec(cmd);
System.out.println("Process exit code is: " + pro.exitValue());
}catch(IOException ioe) {
System.err.println("IOException: " + ioe);
}

When i run this program, i just get the error message:
“IOException: java.io.IOException: Unable to start program”

oops sorry, the code try’s to open up “ped”, not “pterm”, but either way, I
cannot get this code working. Any help would be very appriciated. Thanks!

james


“James” <james.gappy@hap.com> wrote in message
news:a8uvom$mvl$1@inn.qnx.com

Hello,

I am trying to write a java program that will start up pterm (the qnx
terminal screen). For some reason, this code doesn’t work on QNX, but when
i
try to run notepad.exe on widndows instead, it works. Please help me out.
Thanks

Runtime rt = Runtime.getRuntime();
String cmd = “ped”;
try {
Process pro = rt.exec(cmd);
System.out.println("Process exit code is: " +
pro.exitValue());
}catch(IOException ioe) {
System.err.println("IOException: " + ioe);
}

When i run this program, i just get the error message:
“IOException: java.io.IOException: Unable to start program”

I know squat about java but have you tried “/usr/photon/bin/ped”?

James <james.gappy@hap.com> wrote:

Hello,

I am trying to write a java program that will start up pterm (the qnx
terminal screen). For some reason, this code doesn’t work on QNX, but when i
try to run notepad.exe on widndows instead, it works. Please help me out.
Thanks

Runtime rt = Runtime.getRuntime();
String cmd = “ped”;
try {
Process pro = rt.exec(cmd);
System.out.println("Process exit code is: " + pro.exitValue());
}catch(IOException ioe) {
System.err.println("IOException: " + ioe);
}

When i run this program, i just get the error message:
“IOException: java.io.IOException: Unable to start program”

if you give it the fully path, i.e., /usr/photon/bin/ped, it works. I
just tried it on my box…

James wrote:

Hello,

I am trying to write a java program that will start up pterm (the qnx
terminal screen). For some reason, this code doesn’t work on QNX, but when i
try to run notepad.exe on widndows instead, it works. Please help me out.
Thanks

Runtime rt = Runtime.getRuntime();
String cmd = “ped”;
try {
Process pro = rt.exec(cmd);
System.out.println("Process exit code is: " + pro.exitValue());
}catch(IOException ioe) {
System.err.println("IOException: " + ioe);
}

When i run this program, i just get the error message:
“IOException: java.io.IOException: Unable to start program”
\