can't launch link.exe or cl.exe from a java prog
- From: elekis <elekis@xxxxxxxxx>
- Date: Wed, 4 Jun 2008 04:30:08 -0700 (PDT)
hi all.
I have a big trouble with the link.exe and cl.exe.
I try to lauch there from a java application (see below) and I don't
know why , that doesn't work.
the funny thing is that this code work with ohter program like echo,
make, etc... so it's not a java problem.
I ve try the complete path (absolute) , the relative, etc... with this
all program I have the same error , exit value is negatif (so it's a
prob) but the prog is found (cause if the path is false, there is a
exception).
and the funny is that if I try in cmd, that work (he print the help)
but if I try "cmd /C link" I have the same trouble.
So why only this two particular applications and not the rest?? and is
there any options to put or something like that to arrange that?
thanks
a+++
-------------------------------------------------------
import java.io.IOException;
public class Main {
/**
* @param args
*/
public static void main(String[] args) {
ProcessBuilder pb = new ProcessBuilder("link");
try {
Process p = pb.start();
try {
p.waitFor();
System.out.println("Process exitValue: " + p.exitValue());
} catch (InterruptedException e) {
e.printStackTrace();
}
} catch (IOException e) {
e.printStackTrace();
}
}
}
.
- Prev by Date: Re: How to commecnt source code?
- Next by Date: Re: All Users App Data folder
- Previous by thread: How to commecnt source code?
- Next by thread: Visual Studio major releases ?
- Index(es):
Relevant Pages
|