this question has answer here:
- changing current working directory in java? 13 answers
i have eclipse rcp application, launching setting working directory in arguments tab of debug configuration.
meanwhile needed change current working directory upon application start.
i've tried following options : system.setproperty("user.dir", this.strdestination);
but doesn't work if use relative file path, refers older working directory. solution working in regard using getabsolutefile or getabsolutepath (which not feasible option relative paths used in number of location).
any approach in regard highly appreciated.
i'm pretty sure can't modify current process' working directory. instead can use file(string, string)
constructor creates new file
instance parent pathname string , child pathname string.
Comments
Post a Comment