[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
|
[news.eclipse.tools] Working directory not set when running program
|
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