path problem in workspace project!!!!! [message #457947] |
Fri, 08 July 2005 03:53 |
Eclipse User |
|
|
|
Originally posted by: gautamn.iitk.ac.in
Hi,
suppose my source files of project are in folder ":/Documents and
Settings/nitin/Desktop/myproject". I have done Import>Existing Project in
Workspace.....My problem how can I get above path.The reason is that I
have some XML files in the source folder and I want to access it using
File class.
Presently just giving the name of XML file is showing errors.
Regards,
Nitin Gautam.
Note: I am running my project as an External Workbence.
|
|
|
Re: path problem in workspace project!!!!! [message #457957 is a reply to message #457947] |
Fri, 08 July 2005 07:32 |
Eclipse User |
|
|
|
Originally posted by: nightblue99.yahoo.com
Hi;
When you import an existing project into workspace, tihs project folder go
into the workspace that you define. Then you can read your files relative
to the root of the project. Lets say your project name in the workspace is
FileOperations and your source folder name is src; and you have file that
name is Readme.txt in the src folder then
File file = new File("src\\Readme.txt");
FileInputStream stream = new FileInputStream(file);
stream.read();..
bla bla bla....
PS: This like questions may be post to the Eclipse newsgroup.
Night BLue
|
|
|
Powered by
FUDForum. Page generated in 0.02748 seconds