Yeehaa! Works as advertised. Thanks a bunch Greg.
Owen Densmore 505-988-3787 http://backspaces.net
Redfish Group: 505-995-0206 http://redfish.com http://friam.org/
On Sep 20, 2006, at 1:02 AM, Greg Hamilton wrote:
> Owen Densmore wrote:
>> As I understand it, I can build applets with jython. Is this right?
>> I ask because I've heard that it is difficult to build applets in
>> the dynamic java languages (jython, jruby, groovy) due to the way
>> the internal runtime runs into java security issues.
>> But I've also heard the answer for jython is to use jythonc to
>> create java classfiles and jars that are legal for applet usage.
>> Sites mentioning this include:
>> http://itmaurer.com/jython/htdocs/presentation.html (page 29)
>> So before I do something that is likely to fail, I thought I'd
>> check with you to see if jython applets indeed do work.
>> -- Owen
>> Owen Densmore 505-988-3787 http://backspaces.net
>> Redfish Group: 505-995-0206 http://redfish.com http://friam.org/
> Hi Owen,
> I experimented with Jython applets some time ago. Here's a simple
> Hello, World. It works for me on a x86 Debian box using Jython 2.1
> and Sun Java J2SE 1.4.2. Your mileage may vary.
> Save this Python code as HelloWorld.py
> from javax.swing import JApplet, JLabel
> class HelloWorld(JApplet):
> def init(self):
> content = self.getContentPane()
> label = JLabel("Hello World")
> Then create a HelloWorld.jar like this...
> $ jythonc -J -g:none -c -j HelloWorld.jar *.py
> Finally create a little HTML file to load your applet:
> <title>Hello World</title>
> <applet code="HelloWorld"
> width=200 height=100>