[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Re: Working directory not set when running program
|
This is on the plan.
Setting the working directory for a newly created process adds a dependency
on JDK 1.3. The corresponding Runtime.exec method exists at this JDK level only.
We didn't want to add this dependency yet.
Dale King wrote:
> I posted this in the group on the IBM site, but I gather not as many people
> read it.
>
> When you run a java program the current working directory is not set. It
> remains at whatever it was when Eclipse was started. This makes it
> impossible to load resources using a simple FileInputStream. In my case that
> is what I need to do as my program is essentially a command-line tool and
> the resource I am trying to open is a test file for the application.
>
> I can work around it for now by setting the working directory to the project
> in my shortcut for starting Eclipse since this is my only project that I
> need this for.
>
> I consider that a bug. But what would be nicer is to also allow an option to
> allow the working directory to be specifed, just like arguments are
> specified. If it is not set then the projects directory will be used.
>
> --
> Dale King