Skip to main content



      Home
Home » Eclipse Projects » Eclipse Platform » Platform.getInstallLocation() and spaces in path fails.
Platform.getInstallLocation() and spaces in path fails. [message #1725684] Sun, 06 March 2016 14:57 Go to next message
Eclipse UserFriend
In my plugin I want to download info in a subfolder of the eclipse install location.
To do so I use the code below which works fine if there are no spaces in the path of the eclipse location.
	    URI uri;
	    try {
		uri = Platform.getInstallLocation().getURL().toURI();
		String defaulDownloadLocation = Paths.get(uri).resolve("arduinoPlugin").toString(); //$NON-NLS-1$
		return new Path(defaulDownloadLocation);
	    } catch (URISyntaxException e) {
		// this should not happen
		e.printStackTrace();
	    }

If I have a space in the path I get a malformed URI exception.
I have 2 questions:
1) is this a bug?
2) How can I make this work with spaces?

Best regards
Jantje
Re: Platform.getInstallLocation() and spaces in path fails. [message #1725693 is a reply to message #1725684] Sun, 06 March 2016 22:24 Go to previous messageGo to next message
Eclipse UserFriend
Sounds like bug 145096. There is a workaround on StackOverflow.
Re: Platform.getInstallLocation() and spaces in path fails. [message #1725753 is a reply to message #1725693] Mon, 07 March 2016 07:37 Go to previous message
Eclipse UserFriend
Thats it for sure. Thanks for the input.
Know since 2001. I should have written a visual studio plugin Sad
Previous Topic:Step filtering
Next Topic:Eclipse RCP toolbar separators dont show up
Goto Forum:
  


Current Time: Thu Mar 20 08:43:36 EDT 2025

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

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

Back to the top