History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: JRUBY-1641
Type: Bug Bug
Status: Closed Closed
Resolution: Fixed
Priority: Major Major
Assignee: Charles Oliver Nutter
Reporter: Hugh Winkler
Votes: 0
Watchers: 3
Operations

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

Cannot run unsigned in Web Start due to accessing system properties

Created: 29/Nov/07 12:38 PM   Updated: 23/Apr/08 10:03 AM
Component/s: Java Integration
Affects Version/s: JRuby 1.1b1, JRuby 1.0.2
Fix Version/s: JRuby 1.1RC1

Time Tracking:
Not Specified

File Attachments: 1. Text File jruby-1641-cannot-run-unsigned-webstart.patch (22 kb)
2. File jws-unsigned-problem.tgz (13 kb)

Environment: Linux at least


 Description  « Hide
Constructing org.jruby.Ruby invokes Ruby.loadPosix, which calls System.getProperty("jruby.native.enabled"). Unsigned Java Web Start apps may only access a few well known system properties; jruby.native.enabled not among them.

The exception is:
java.security.AccessControlException: access denied (java.util.PropertyPermission jruby.native.enabled read)

caused by...
at org.jruby.Ruby.loadPosix(Ruby.java:2448)



 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
Hugh Winkler - 29/Nov/07 12:54 PM
a complete NetBeans project demoing the problem. You'll have to modify at least nbproject/project.properties:

file.reference.jruby-complete.jar=../../env/jruby/jruby/lib/jruby-complete.jar

which is specific to my enviro. Could be other changes needed too.

To repro bug:
ant jws-run

You will get exception I described. (I am running against jre 6 on ubuntu)


Hugh Winkler - 29/Nov/07 01:02 PM
also need to change the line in project.properties:
jnlp.codebase.url=file:/home/hughw/NetBeansProjects/JavaApplication1/dist

Vladimir Sizikov - 21/Dec/07 07:00 AM
There are plenty of cases when unprotected system property access is performed throughout the code, and some other problems that prevent runnnig JRuby in unsigned WebStart app (attempts to access files, attempts to create class loaders).

The proposed patch fixes all of these, and I'm now able to run simple JRuby scripts from within unsigned WebStart, woohooo!


Vladimir Sizikov - 21/Dec/07 07:01 AM
The patch that fixes the problem.

Charles Oliver Nutter - 21/Dec/07 08:00 AM
Fixed in 5324. Thanks!