Matt Gerrans
Posts: 1153
Nickname: matt
Registered: Feb, 2002
|
|
Re: using exec() in java.. PLEASE HELP ME!!!
|
Posted: Mar 30, 2004 7:31 PM
|
|
By the way, if you like a more complicated solution, you could write a little JNI wrapper for chdir().
JFileChooser has a setCurrentDirectory() method, too, but I haven't tried it. If that works, you could use it to change the current directory, then exec just the compile part of the command (and probably change back to your original directory).
Finally, I bet there is a way to work the command line of tcc (is that Turbo C?) such that you don't have to run it from the directory where the C file is. After all, editors, IDEs and makefiles have been doing that kind of thing for aeons.
|
|