Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Equinox » URLEncoded Directory Paths
URLEncoded Directory Paths [message #90814] Tue, 19 June 2007 20:03 Go to next message
Brett Humphreys is currently offline Brett HumphreysFriend
Messages: 17
Registered: July 2009
Junior Member
All,
I've got a situation where I'm running equinox in a path that is URL
encoded, but I'm noticing problem (specifically making osgi.bundle
values relative to the syspath), however that led me to a bigger issue
that I can't seem to solve.

If I have the equinox jar in a path with a percent sign in it, equinox
won't start. For example:


$ pwd
/tmp/test%one

$ ls
configuration org.eclipse.osgi_3.2.2.R32x_v20070118.jar

$ java -jar org.eclipse.osgi_3.2.2.R32x_v20070118.jar -console -clean
java.lang.IllegalArgumentException
at sun.net.www.ParseUtil.decode(ParseUtil.java:183)
at sun.net.www.protocol.file.Handler.openConnection(Handler.jav a:63)
at sun.net.www.protocol.file.Handler.openConnection(Handler.jav a:55)
at java.net.URL.openConnection(URL.java:943)
at java.net.URL.openStream(URL.java:1007)
at org.eclipse.core.runtime.adaptor.EclipseStarter.loadProperti es(EclipseStarter.java:1125)
at
org.eclipse.core.runtime.adaptor.EclipseStarter.loadConfigur ationInfo(EclipseStarter.java:1117)
at org.eclipse.core.runtime.adaptor.EclipseStarter.startup(Ecli pseStarter.java:274)
at org.eclipse.core.runtime.adaptor.EclipseStarter.run(EclipseS tarter.java:173)
at org.eclipse.core.runtime.adaptor.EclipseStarter.main(Eclipse Starter.java:150)



More specifically, if the percent sign is a valid escaping (ie, if the dir was /tmp/test%20) equinox
will start, however it will fail to find the config.ini that is located in the configuration directory.

I've played games with adding -install, -configuration, -data and -framework to the command line all
with varying degrees of success (for example I would set -configuration to be /tmp/test%25one), the
config.ini was eventually found (I think) but the osgi.bundles option in config.ini wasn't doing
what I expected it to do, nor was a log file being generated in the configuration directory.

Anyone have any thoughts on a work around? I think the issue boils down to the
o.e.c.runtime.internal.adapter.BasicLocation class' setURL method doing:
value = new URL("file:" + basepath) <-- where basepath is not URL encoded

but I'm not 100% sure this is the real core of the issue.

Thanks

-Brett
Re: URLEncoded Directory Paths [message #90841 is a reply to message #90814] Tue, 19 June 2007 21:35 Go to previous message
Eclipse UserFriend
Originally posted by: alex_blewitt.yahoo.com

Sounds likely. The new URL will treat any % as a translation (and may fail in some cases). I'd raise a bug at https://bugs.eclipse.org about it.

Alex.
Previous Topic:equinox jetty in RCP
Next Topic:JAAS Authorization
Goto Forum:
  


Current Time: Thu Mar 28 15:50:04 GMT 2024

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

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

Back to the top