From 90555e0f1ddaf100ab79ed111a04575f7a7cd621 Mon Sep 17 00:00:00 2001 From: Stephen Bannasch Date: Fri, 26 Dec 2008 21:24:07 -0500 Subject: [PATCH] add dir with samples for signed and unsigned jnlps run ant to generate jnlp-sample keystore, copy jruby-comp[lete.jar, and to copy and sign jruby-complete.jar --- samples/jnlp/README | 59 +++++++++++++++++++++++++++++++++++++ samples/jnlp/build.properties | 4 ++ samples/jnlp/build.xml | 64 +++++++++++++++++++++++++++++++++++++++++ samples/jnlp/jirb.jnlp | 15 +++++++++ samples/jnlp/signed-jirb.jnlp | 18 +++++++++++ 5 files changed, 160 insertions(+), 0 deletions(-) create mode 100644 samples/jnlp/README create mode 100644 samples/jnlp/build.properties create mode 100644 samples/jnlp/build.xml create mode 100644 samples/jnlp/jirb.jnlp create mode 100644 samples/jnlp/signed-jirb.jnlp diff --git a/samples/jnlp/README b/samples/jnlp/README new file mode 100644 index 0000000..a321daa --- /dev/null +++ b/samples/jnlp/README @@ -0,0 +1,59 @@ +There are two sample Java Web Start jnlp files in this directory for +starting JRuby and displaying an IRB Console. + + 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. + + signed-jirb.jnlp + +signed-jirb.jnlp uses a signed version of the jruby-complete.jar +and includes this declaration in the jnlp: + + + + + +Running signed-jirb.jnlp will start a JRuby IRB console with Java security +permissions to interact with the local environment. + +In Java 1.5 the codebase attribute on the jnlp element does not support +using a relative path spec to refer to the JRUBY_HOME/lib directory so +the default ant task copies jruby-complete.jar to the jars/ directory +and also places a signed copy in signed-jars/. + +Before running the ant task make sure you have a copy of jruby-complete.jar +here: + + $JRUBY_HOME/lib/jruby-complete.jar + +If you have the JRuby source the jruby-complete.jar can built with this +ant task: + + ant jar-complete + +Run the default ant task to prepare jruby-complete.jar for both the +unsigned and signed sample jnlps. + +Running the unsigned jnlp sample: + + javaws jirb.jnlp + +Running the signed jnlp sample: + + javaws signed-jirb.jnlp + +The ant task will create a default jnlp-sample-keystore to use when +signing the jar. + +You can create a keystore and certificate manually like this: + + keytool -genkey -keystore jnlp-sample-keystore -alias jnlp-sample-keystore + keytool -selfcert -alias jnlp-sample-keystore -keystore jnlp-sample-keystore + +If you change the properties here or in the ant task generate-keystore +also edit the values in the file default.properties to match the new values. diff --git a/samples/jnlp/build.properties b/samples/jnlp/build.properties new file mode 100644 index 0000000..202d185 --- /dev/null +++ b/samples/jnlp/build.properties @@ -0,0 +1,4 @@ +keystore=jnlp-sample-keystore +storepass=jnlp-sample-keystore +keypass=jnlp-sample-keystore +alias=jnlp-sample-keystore \ No newline at end of file diff --git a/samples/jnlp/build.xml b/samples/jnlp/build.xml new file mode 100644 index 0000000..d93b30a --- /dev/null +++ b/samples/jnlp/build.xml @@ -0,0 +1,64 @@ + + + + A testbed for getting JRuby to work with web start. + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Testing the jnlp samples: + + javaws jirb.jnlp + + javaws signed-jirb.jnlp + + + diff --git a/samples/jnlp/jirb.jnlp b/samples/jnlp/jirb.jnlp new file mode 100644 index 0000000..9db90d9 --- /dev/null +++ b/samples/jnlp/jirb.jnlp @@ -0,0 +1,15 @@ + + + + JRuby IRB Console + The JRuby Team + Sample WebStart Application with JRuby + JRuby IRB Console Sample + + + + + + + + diff --git a/samples/jnlp/signed-jirb.jnlp b/samples/jnlp/signed-jirb.jnlp new file mode 100644 index 0000000..5542706 --- /dev/null +++ b/samples/jnlp/signed-jirb.jnlp @@ -0,0 +1,18 @@ + + + + JRuby IRB Console + The JRuby Team + Sample JRuby Signed Java Web Start Application + JRuby IRB Console Sample + + + + + + + + + + + -- 1.6.0.1