I am actually using another tool that uses jython as it's interpretor.
My application is a Java application, not a jython _for_ the app...
To complicate things, I have to use IBM's 1.3.1 version of the JDK as
well for other reasons. I can run my application outside of webstart
and it picks up the classpath jar files fine. I have Full security
rights already defined on my application, it is for an internal company
product.
Any help would be appreciated,
-Al Wick
Jon Franz wrote:
>Are you attempting to use jython as a scripting tool for a webstart app,
>or use jython _for_ the app.
> The former will get ugly with the security restrictions in place for JWS
>apps.
> The latter does not require _any_ java code to initialize the app. Create
>your
>app in jython. Use the following trick if your main module does not
>subclass
>a java application object, but instead is a script-style:
>
>if __name__ == '__main__':
> # main entry point into your code
>
>Then, compile with jythonc, use the --all and --deep flags, these will
>put the jython runtime files needed for your app in the generated jar.
>Name the jar the same name (sans extension) as your main module, ie:
>
>D:\jython-2.1\jythonc.bat --all --deep --jar e:\test\mine.jar
>e:\test\mine.py
>
>then make sure you reference that jar _first_ in your jnlp file:
><resources>
> <j2se version="1.4+"/>
> <jar href="mine.jar"/>
>
>And that later in the file, you set the main class to the name of the jar,
>sans extension:
><application-desc main-class="mine"/>
>
>Then you'll be good to go, and have a jython webstart app.
>Other notes:
>- you can, as always, include other jars used by your app in the resource
>section.
>- if your main module imports your other jython modules (even if it doesn't
>use them),
> then you only need to run jythonc on the main module.
>- you may need to digitally sign your jar files due to the --all flag, an
>example of how
>to do so is here:
>http://developer.java.sun.com/developer/technicalArticles/Programming/jnlp/
>
>
>
>>Message: 8
>>Date: Fri, 05 Sep 2003 13:56:20 -0500
>>From: Allan Wick <registerit@...>
>>To: jython-users@...
>>Subject: [Jython-users] Webstart Classloader issue
>>
>>I am trying to use Jython inside of Webstart application. How do I tell
>>Jython which class loader to use?
>>
>>Here is what I have tried and doesn't seem to make a difference.
>>
>> Thread.currentThread().setContextClassLoader(
>>MyClass.class.getClassLoader() );
>>
>> // -- Python setup --
>> System.out.println( "Initializing python...." );
>>
>> PySystemState.initialize( System.getProperties(),
>> new Properties(),
>> new String[0],
>>
>>Thread.currentThread().getContextClassLoader() );
>> System.out.println( "Done initializing python...." );
>>
>>It is only parsing the .jar files from the webstart vm and none of the
>>classes that are part of the webstart application.
>>
>>Any help is appreciated.
>>
>>Thanks,
>>
>>-Al Wick
>>
>>
>>
>>
>>--__--__--
>>
>>_______________________________________________
>>Jython-users mailing list
>>Jython-users@...
>>https://lists.sourceforge.net/lists/listinfo/jython-users
>>
>>
>>End of Jython-users Digest
>>
>>
>>
>
>
>
>-------------------------------------------------------
>This sf.net email is sponsored by:ThinkGeek
>Welcome to geek heaven.
>http://thinkgeek.com/sf
>_______________________________________________
>Jython-users mailing list
>Jython-users@...
>https://lists.sourceforge.net/lists/listinfo/jython-users
>
>
>
>
|