Deploying Jython/Swing applications
===================================
The easiest deployment method for desktop Java applications is
`Java Web Start `_.
This involves serving the application files from a web server.
Steps required to publish your application with Java Web Start:
#. Create a code signing key if you don't have one already, using
`keytool `_
#. Get the standalone Jython jar (use the Jython installer) and sign the jar
with `jarsigner `_
using your own key
#. Sign your copy of jython-swingutils.jar
#. Copy both jars to your web server's application directory (the one you're
serving your application files from)
#. Create a JNLP file for your application (a sample can be found in the
``examples`` directory) and copy it to the web server
#. Build and sign your application's jar file(s) and copy them to web server
To install the application, just point a web browser to the JNLP file and Java
should do the rest. You only need to repeat the last step when you update your
application. You can automate building and signing using
`ant `_ or similar tools. The Jython-Swingutils
build.xml file should provide a good starting point for this. It just needs a
build.properties file to supply the necessary variables.
If your application depends on third party Python distributions (installed in
the "site-packages" directory), you need to include them in one or more .jar
files distributed with your application. You have to package them so that the
top level package directory (and not its contents!) is at the root of the jar
structure. Remember to add the jar file(s) to your .jnlp file.
The `Jump `_ tool by Olli Wang was specifically
designed for packaging Jython applications, but as of this writing, the
documentation is nowhere to be seen and the future of that project seems
uncertain. It might be worth a look anyway since it is loaded with useful
features.
.. seealso:: `Java Web Start tutorial `_
.. seealso:: `Deploying a Single JAR, the Jython Book `_