ridencww / goldengine

Java implementation of Devin Cook's GOLD Parser engine
Other
35 stars 14 forks source link

Resources are not properly loaded from jar files #2

Closed brweber2 closed 12 years ago

brweber2 commented 12 years ago

I have a diff here that shows the change that works for me (I haven't tested it on Windows).

https://github.com/brweber2/goldengine/commit/ba09761e581af9dc2464009e713018ffa4f8374f

The leading '/' is stripped off the jar file path making it relative instead of absolute... so the jar file can't be found.

I just added 9 instead of 10 to remove the leading 'jar:file:' instead of 'jar:file:/' but I'm not sure if you'll ever see the double slash in a jar URI?

ridencww commented 12 years ago

This is indeed a defect and one that I fixed in my toolkit library about a month ago. I had forgotten that I pulled out ResourceHelper as a standalone class for this project. Your fix is the appropriate one and has been tested under Windows, Linux, and Macintosh OS X. The next commit to this project will incorporate your change along with the Maven reorganization..

ridencww commented 12 years ago

Fix applied to ResourceHelper and is available in v5_0_0.