> Hello
> I'm trying to run a exe file named butil.exe from within a java
[quoted text clipped - 30 lines]
>
> Thank you.
Return code 2 on Windows means that the file 'd:\\modec160\\p_21\\butil.exe'
does not exist. Perhaps you've just mistyped the path? By the way, here's a
link to the full set of Windows return codes:
http://msdn.microsoft.com/library/?url=/library/en-us/debug/base/system_error_co
des.asp?frame=true
Also, I found this article very useful in helping me with problems in
running executables:
http://www.javaworld.com/javaworld/jw-12-2000/jw-1229-traps_p.html.
--
Rhino
mohsen_fakhari@yahoo.com - 09 Nov 2006 15:09 GMT
Hi
I think there should be another missed file,because the path is correct
and
when I change the path to an incorrect path(e.g. buti.exe instead of
butil.exe)
I got another error:
java.io.IOException: CreateProcess: d:\modec160\p_21\buti.exe error=2
Thank you
mohsen_fakhari@yahoo.com - 09 Nov 2006 15:22 GMT
I read the document in JavaWorld too.
It was helpfull and I know a lot more now,
but there it didn't help me
nelsonsoft@nssdd.com - 09 Nov 2006 16:36 GMT
If the error is from Butil then the error 2 could represent a corrupt
btrieve file. Do you get this error from just running the command line
utility by itself.
Gil
> I read the document in JavaWorld too.
> It was helpfull and I know a lot more now,
> but there it didn't help me
mohsen_fakhari@yahoo.com - 09 Nov 2006 17:00 GMT
Running butil in cmd I have such a thing:
Btrieve Utilities Version 5.12
Copyright 1982 - 1990, Novell, Inc. All Rights Reserved.
Usage is BUTIL -CLONE <OUTPUT-FILE> <SOURCE-FILE> [-O<OWNER1>]
Usage is BUTIL -COPY <INPUT-FILE> <OUTPUT-FILE> [-O<OWNER1>
[-O<OWNER2>]]
Usage is BUTIL -CREATE <FILE-NAME> <DESCRIPTION FILE>
Usage is BUTIL -DROP <BTRIEVE-FILE> <KEY NUMBER> [-O<OWNER>]
....
But from within my java code I receive nothing
mohsen_fakhari@yahoo.com - 09 Nov 2006 17:40 GMT
Hi all
If it may help:
I created a bat file with instructions to run butil and then
tried to run this bat file from within my java code.
Surprisingly it works!
I've error messages I should and whith correct arguments I've correct
resulted files.
I'm still eager to do it by pure java.
Thank you