Home » Developer & Programmer » JDeveloper, Java & XML » solution for io exception
solution for io exception [message #92277] Fri, 14 May 2004 08:48 Go to next message
BIndi
Messages: 4
Registered: March 2003
Junior Member
import java.io.*;
import java.lang.*;
 public class k   {
 public static void main (String[[]] args) throws IOException, InterruptedException {
  String[[]] cmdArray = {"c:\wtk20\bin\emulator","-classpath \apps\audidemo\bin\audiodemo.jar", "-Xdescriptor:\apps\bin\audidemo\audiodemo.jad"};
  Process proc = Runtime.getRuntime().exec("run.bat");
  System.out.println("hello");
  Thread.currentThread().join();
 }
}

its showing me the following error:
Exception in thread "main" java.io.IOException: CreateProcess: .bat error=2
        at java.lang.Win32Process.create(Native Method)
        at java.lang.Win32Process.<init>(Win32Process.java:66)
        at java.lang.Runtime.execInternal(Native Method)
        at java.lang.Runtime.exec(Runtime.java:566)
        at java.lang.Runtime.exec(Runtime.java:428)
        at java.lang.Runtime.exec(Runtime.java:364)
        at java.lang.Runtime.exec(Runtime.java:326)
        at k.main(k.java:6)
Re: solution for io exception [message #92295 is a reply to message #92277] Thu, 20 May 2004 07:51 Go to previous messageGo to next message
AL
Messages: 24
Registered: October 2000
Junior Member
A value of 2 returned, at that point, means that the file hasn't been found.

Aside from this I don't really know hope it helps though.

This link may help:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps.html

Best of luck,
Al.
Re: solution for io exception [message #92661 is a reply to message #92277] Wed, 10 November 2004 05:21 Go to previous message
Puffy Combs
Messages: 1
Registered: November 2004
Junior Member
Use the following

cmd /c run.bat
Previous Topic: What I install in client if I use OCI/Thin Driver in my entranet Application
Next Topic: Unsupported syntax for refreshRow
Goto Forum:
  


Current Time: Thu Apr 25 19:27:08 CDT 2024