This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach on-line!
See this thread for details.
The moose likes Other Application Frameworks and the fly likes Relative path in eclipse RCP Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Frameworks » Other Application Frameworks
Bookmark "Relative path in eclipse RCP" Watch "Relative path in eclipse RCP" New topic
Author

Relative path in eclipse RCP

Piotr Gajowy
Greenhorn

Joined: Jan 05, 2012
Posts: 8
Hello, my problem is as follows:

I have an eclipse installed in folder D:\eclipse\. My project folder is in d:\java_workspace\ProjectName\. My application will need to read files stored in local directory (e.g. d:\java_workspace\ProjectName\data\somefile.txt), but when I point to the file with relative path ".\data\somefile.txt", eclipse looks for the file here: d:\eclipse\data\somefile.txt.

Why? How to change it to look in project folder? It has to be possible as eclipse branding is by default stored in ProjectFolder\icons (or something similar), right?


EDIT:

Ok, I got it, one need to change working directory in run configuration.
 
 
subject: Relative path in eclipse RCP
 
Similar Threads
FileNotFoundException
directory in servlet
JSP files not running (Eclipse 3.4 + Tomcat 5.0)
Problem in accessing dynamically created image in <img src=""> tag
Read Text File Using Relative Path.