Changes between Version 3 and Version 4 of PLATFORM_DEPLOYMENT_TARGET_JWS_R0
- Timestamp:
- 01/07/09 01:32:56 (16 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
PLATFORM_DEPLOYMENT_TARGET_JWS_R0
v3 v4 20 20 21 21 == Task result == 22 ('''Please note''': All results are to be delivered in the implementation section of this wiki page.)22 ('''Please note''': Results are to be delivered on this wiki page - in the design and implementation sections.) 23 23 * The URL of a demo JWS deployment of Sophie 2. 24 24 * Documentation on deploying Sophie 2 via JWS. … … 34 34 35 35 == How to demo == 36 ^(In this section you must add instructions for the demo of the task.)^ 36 Go to the demo deployment page, click the link, wait for a while (be patient) and observe Sophie 2 Author starting up. 37 37 38 38 = Design = 39 39 40 = Implementation = 41 42 == Demo == 43 URL of the demo deployment: http://asteasolutions.net/~jordan/jws-demo/sophie2author.html. 44 45 === Introduction === 46 To prepare an application for deployment via Java Web Start, you write a JNLP file (JWS reads it to know what to do) and package the appilcation into .jar files. Then you put the JNLP file and the .jar files into a folder that is served by a web server.[[BR]]The JNLP file describes the application. It tells JWS what's the application's name, where the aplication's .jar files are located and more. 40 == Introduction == 41 To prepare an application for deployment via Java Web Start, you write a JNLP file (JWS reads it to know what to do) and package the application into .jar files. Then you put the JNLP file and the .jar files into a folder that is served by a web server.[[BR]]The JNLP file describes the application. It tells JWS what's the application's name, where the aplication's .jar files are located and more.[[BR]] 47 42 48 43 == Deploying Sophie 2 via Java Web Start == … … 50 45 1. Put the .jar files into a temporary directory. 51 46 1. Prepare a JNLP file (e.g. by customizing the attached example) and put it in the temporary directory. 52 1. Generate a keypair and a self-signed certificate by using {{{keytool -genkeypair}}}. ''This step is doneonly once. The generated keypair and certificate are used many times.''47 1. Generate a keypair and a self-signed certificate by using {{{keytool -genkeypair}}}. ''This step is performed only once. The generated keypair and certificate are used many times.'' 53 48 1. Sign the {{{org.sophie2.launcher}}} and {{{org.sophie2.author}}} .jar files, one by one, using the {{{jarsigner}}} command: {{{jarsigner <file> mykey}}}. 54 49 1. Copy the contents of the temporary directory to a suitable location on the web server. 55 50 51 '''Note:''' The web server hosting the JNLP file must be configured to serve {{{.jnlp}}} files with the {{{application/x-java-jnlp-file}}} MIME type. 52 = Implementation = 53 54 == Demo == 55 URL of the demo deployment: http://asteasolutions.net/~jordan/jws-demo/sophie2author.html. 56 56 57 57 == How launching works - step by step == … … 67 67 68 68 == Limitations and expected problems == 69 * Native libraries are supported by Java Web Start, however, what really matters for Sophie 2is Felix's support for them.69 * Native libraries are supported by Java Web Start, however, what really matters is Felix's support for them. 70 70 71 71 == Notes == 72 * The web server hosting the JNLP file must be configured to serve {{{.jnlp}}} files with the {{{application/x-java-jnlp-file}}} MIME type. 73 * An example JNLP file is attached to this wiki page. 72 73 * An example JNLP file is attached to this wiki page. It is also available in the repository at source:trunk/sophie2-platform/src/main/resources/sophie2author.jnlp. 74 * An alternate launcher class - {{{org.sophie2.launcher.JavaWebStartMain}}} - is used for Java Web Start. It was added in [1148] and is a modified copy of the standard launcher class {{{org.sophie2.launcher.Main}}}. 74 75 * Java Web Start downloads and caches .jar files. Felix downloads and caches .jar files too. The two cache mechanisms don't play well together. 75 76 * Felix needs unrestricted access to its bundle cache directory in order to function properly. That's why the JNLP file of Sophie 2 Author requests the {{{all-permissions}}} trusted execution environment. This trusted environement gives the application full access to the user's computer. There's an additional advantage to running in the trusted environment: the user doesn't get annoyed by security dialogs constantly popping up to request permission. … … 80 81 81 82 = Comments = 83 * There are a lot of things one can put in a JNLP file. A production deployment of Sophie 2 will need much richer JNLP file than offered in this demo deployment. 82 84 * A future revision of this task should resolve the problem of cache interaction between Java Web Start and Felix. 83 * There are a lot of things one can write in a JNLP file. A production deployment of Sophie 2 will need much richer JNLP file than offered in this demo deployment. 85 * The functionality that the {{{org.sophie2.launcher.JavaWebStartMain}}} class provides should be merged into {{{org.sophie2.launcher.Main}}}. 86 * The Reader edition of Sophie 2 (when it appears) should be launchable via Java Web Start too. 87 * A future revision of this task should optimize the download size in order to reduce download time (and improve user experience), e.g. by eliminating multiple copies of common dependencies. 84 88 ^(Write comments for this or later revisions here.)