Path Problem!!!! [message #186019] |
Fri, 01 July 2005 04:17 |
Eclipse User |
|
|
|
Originally posted by: gautamn.iitk.ac.in
Hi,
regarding my path problem I post the message last week...but the
solution doen't work....
/*********************************************************** ***************/
IFile file = ((IFileEditorInput)input).getFile();
String fullPath = file.getLocation( ).toOSString( )
if you through the FileDialog ,code example
FileDialog fileChooser = new FileDialog( getShell( ), SWT.OPEN );
String fullPath = fileChooser.open( );
/*********************************************************** ***************/
Actually I want to read a xml file that may be anywhere along with source
code... I am exporting this project in the workspace...Suppose src file
are in "C:/kuda/myproject/src/myxml.xml" and I have eclipse installed in
D:/ drive.
How can I read this xml file in my code (How can I get the path???)
Regards,
Nitin.
|
|
|
|
Re: Path Problem!!!! [message #186059 is a reply to message #186035] |
Fri, 01 July 2005 08:57 |
Eclipse User |
|
|
|
Originally posted by: gautamn.iitk.ac.in
Can't you open a dialog?
FileDialog fileChooser = new FileDialog( getShell( ), SWT.OPEN );
String fullPath = fileChooser.open( );
FileInputStream stream = new FileInputStream(filename)
//read the file.
no i can't use a dialog...i have to read in one of code files using File
Class.
I need to find the path becuase just providing filename is not working and
inorder to make it work i have to put it in eclipse folder.
Regards,
Nitin.
|
|
|
Powered by
FUDForum. Page generated in 0.03223 seconds