M
mohsen_fakhari
Hello
I'm trying to run a exe file named butil.exe from within a java
application.
This is my code:
Process p = run.exec("d:\\modec160\\p_21\\butil.exe");
BufferedReader err =new BufferedReader(new
InputStreamReader(p.getErrorStream()));
BufferedReader in = new BufferedReader(new
InputStreamReader(p.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
System.out.println(line);
}
while ((line = err.readLine()) != null) {
System.out.println(line);
}
int exitValue = p.waitFor();
System.out.println("Process exit value: " + exitValue);
exitValue is always 2.
Like many other programms 'butil' when run without any arguments will
give a usage discription,
but I don't have anything.
When I give its arguments,it should create a text file but I don't have
it too.
If it is important butil belongs to Btrieve,an old record manager and
I'm using JDK1.4 on winXP
Any thing you think may help,may really help.
Thank you.
I'm trying to run a exe file named butil.exe from within a java
application.
This is my code:
Process p = run.exec("d:\\modec160\\p_21\\butil.exe");
BufferedReader err =new BufferedReader(new
InputStreamReader(p.getErrorStream()));
BufferedReader in = new BufferedReader(new
InputStreamReader(p.getInputStream()));
String line;
while ((line = in.readLine()) != null) {
System.out.println(line);
}
while ((line = err.readLine()) != null) {
System.out.println(line);
}
int exitValue = p.waitFor();
System.out.println("Process exit value: " + exitValue);
exitValue is always 2.
Like many other programms 'butil' when run without any arguments will
give a usage discription,
but I don't have anything.
When I give its arguments,it should create a text file but I don't have
it too.
If it is important butil belongs to Btrieve,an old record manager and
I'm using JDK1.4 on winXP
Any thing you think may help,may really help.
Thank you.