Help!!! How to execute a File during runtime
843798May 17 2008 — edited May 18 2008Dear Javers ;)
am trying to run an executable file which is located in other directory, e.g.
/home/haha/app/aaa
normally I could create a RunTime instance and pass the absolute path and get it executed, but this executable file (aaa above) needs some resources in its directory(/home/haha/app/resource) to get started, and this resources can not be passed as argument, so I get the error:
/home/workspace/myproject/resource is not found
because the aaa tries to reach resource directory during runtime and the current location is where my java file runs (/home/workspace/myproject/)
so, I would like to know, how I could switch my current location during runtime to successfully run the aaa file, so that the resource directory can be found, and come back(if necessary) again???