Details
-
Type:
New Feature
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: JRuby 1.1
-
Fix Version/s: JRuby 1.2
-
Component/s: Miscellaneous
-
Labels:None
-
Number of attachments :
Description
I've attached a tar.gz to this issue which when extracted in samples/ adds s both unsigned and signed examples that work in Java 1.5 and 1.6.
[~/dev/jruby_trunk/jruby/samples]$ ls -l jnlp total 48 -rw-r--r-- 1 stephen stephen 1117 Jan 25 10:57 README -rw-r--r-- 1 stephen stephen 773 Jan 25 10:44 build.xml -rw-r--r-- 1 stephen stephen 869 Jan 25 10:09 jirb.jnlp -rw-r--r-- 1 stephen stephen 1269 Jan 25 10:20 jnlp-sample-keystore lrwxr-xr-x 1 stephen stephen 9 Jan 25 10:05 lib -> ../../lib drwxr-xr-x 2 stephen stephen 68 Jan 25 10:59 signed-jars -rw-r--r-- 1 stephen stephen 828 Jan 25 10:52 signed-jirb.jnlp
This is what is contained in the README:
There are two sample Java Web Start jnlp files in this directory for starting JRuby and displaying an IRB Console.
1. jirb.jnlp
jirb.jnlp uses an unsigned version of the jruby-complete.jar and is run with the standard minimal security permissions that Java Web Start assigns to an untrusted Web Start application. For example while running this version you won't be able to read or write to local directories.
Running jirb.jnlp:
javaws jirb.jnlp
2. signed-jirb.jnlp uses a signed version of the jruby-complete.jar and includes this declaration in the jnlp:
<security>
<all-permissions/>
</security>
This signed version of jirb.jnlp should be able to do almost anything on your local computer.
Before running signed-jirb.jnlp sign and copy jruby-complete.jar with this ant task:
ant sign-jar
Running signed-jirb.jnlp:
javaws signed-jirb.jnlp
The keystore and certificate used for signing jruby-complete.jar wer created like this:
keytool -genkey -keystore jnlp-sample-keystore -alias jnlp-sample-keystore
keytool -selfcert -alias jnlp-sample-keystore -keystore jnlp-sample-keystore
I don't have a Windows system and the attached patch uses a symbolic link to create a local directory reference in the new jnlp dir to $JRUBY_HOME/lib. I'm not sure what is the best strategy for accomplishing this on Windows.