Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Obtain Eclipse directory path
Obtain Eclipse directory path [message #1386391] Tue, 17 June 2014 10:10 Go to next message
Lorenzo Isidori is currently offline Lorenzo IsidoriFriend
Messages: 5
Registered: June 2014
Junior Member

Hi,
I need to read a file located in the eclipse directory (not in workspace). How can I obtain my eclipse directory path???
Re: Obtain Eclipse directory path [message #1386430 is a reply to message #1386391] Tue, 17 June 2014 13:41 Go to previous messageGo to next message
Eric Rizzo is currently offline Eric RizzoFriend
Messages: 3071
Registered: July 2009
Senior Member
A little bit of Googling found the answer: http://stackoverflow.com/questions/4494528/how-can-i-get-the-absolute-path-to-the-eclipse-install-directory
Re: Obtain Eclipse directory path [message #1386437 is a reply to message #1386430] Tue, 17 June 2014 14:25 Go to previous messageGo to next message
Lorenzo Isidori is currently offline Lorenzo IsidoriFriend
Messages: 5
Registered: June 2014
Junior Member

I've seen that page but it doesn't work for me: I have a target platform dedicated for my eclipse application, so the instruction:

Platform.getInstallLocation().getURL()

gives me the URL of my target platform.
The instruction:

Platform.getInstanceLocation().getURL()

gives me the URL of the runtime workspace. I need the path of my eclipse directory.
Re: Obtain Eclipse directory path [message #1386544 is a reply to message #1386437] Wed, 18 June 2014 08:22 Go to previous message
Lorenzo Isidori is currently offline Lorenzo IsidoriFriend
Messages: 5
Registered: June 2014
Junior Member

Resolved. I placed the file to read in my target platform directory and I used the instruction:

Platform.getInstallLocation().getURL()

to retrieve the file while I'm developing in eclipse.
In the product the instruction over gives me exactly the path of the directory of the product.
Thank you!
Previous Topic:shift selected text left/right
Next Topic:Trying to download Eclipse for Windows
Goto Forum:
  


Current Time: Tue Oct 15 10:58:02 GMT 2019

Powered by FUDForum. Page generated in 0.02571 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top