Hi ,
This may be of interest to someone so I thought I'd post some info
on how I got Jython in a Java project running over JNLP a.k.a Webstart .

I'm sure I've made some classic mistakes, but it does work.

One of the many problems I had was adding a path to my *.py files over JNLP
the python.path I had in my project worked fine locally but when using
it in a sandboxed webstart environment I had to do quite a few extra steps.

1. found I had to explode the jython.jar into the distribution and then just jarsign the one jar
2. had to add "__pyclasspath__/dsi" to find my *.py files (see below)
3. had to add "__pyclasspath__/Lib" to find Jython's distro *.py files (see below)

code snippet to set pyclasspath from
        String path1 = "__pyclasspath__/Lib";
        String path2 = "__pyclasspath__/dsi";
        Properties props = new Properties();

        if (System.getProperty("os.name").startsWith("Win")){
            props.setProperty("python.path", path1 + ";" + path2);
        } else{
            props.setProperty("python.path", path1 + ":" + path2);
        PythonInterpreter.initialize(System.getProperties(), props,
                new String[] {""});

        PySystemState pySysState = new PySystemState();
        log.info("Jython sys state initialized. sys.path: " + pySysState.path);

Example project is here (you need java 7):

Jython code is here:


To see it running via jnlp (note the jtable summary of disk space is in jython):

Be interested to see if anyone has had these issues.