Issue Details (XML | Word | Printable)

Key: JRUBY-1574
Type: Improvement Improvement
Status: Closed Closed
Resolution: Fixed
Priority: Minor Minor
Assignee: Nick Sieger
Reporter: Adam Payne
Votes: 1
Watchers: 3
Operations

If you were logged in you would be able to see more operations.
JRuby

Extract into jruby.home from jar: url

Created: 16/Nov/07 02:22 PM   Updated: 04/Jul/08 09:07 AM   Resolved: 27/May/08 07:33 AM
Component/s: Miscellaneous
Affects Version/s: JRuby 1.1.1
Fix Version/s: JRuby 1.1.2

Time Tracking:
Not Specified

File Attachments: 1. Text File extract.rb.patch (1 kB)


Patch Submitted: Yes


 Description  « Hide

Current jruby/extract.rb in trunk uses a regex on _FILE_ to determine the path to the jruby-complete.jar, and then opens it with java.util.zip.ZipFile, but this only works when jruby-complete.jar is run from a file: url, ie not when loaded over any sort of http connection. New method uses ClassLoader.getResource to determine the url of the JAR file, and then uses java.net.URL.openConnection.jar_file to open a JarFile descendant of ZipFile. It only copies jruby-complete.jar to jruby.home/lib if it was found at a file: url. Patch modifies trunk/jruby/src/jruby/extract.rb



Charles Oliver Nutter added a comment - 12/May/08 04:30 PM

Patch provided, so this may be a trivial fix to get in for 1.1.2.


Nick Sieger added a comment - 27/May/08 07:33 AM

Applied in 6817. Thanks!