Skip to Main Content

Java SE (Java Platform, Standard Edition)

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Help!!! How to execute a File during runtime

843798May 17 2008 — edited May 18 2008
Dear 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???
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 15 2008
Added on May 17 2008
7 comments
155 views