469,645 Members | 1,595 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,645 developers. It's quick & easy.

jython and swing

hello, can I ask a jython question here?

when I use the jython interpreter I have no problem with the statement:

from java import lang
from javax import swing

but when I put this in a script, I get a package not found error.
what am I doing wrong?

the script header is #!/bin/env jython

--
Nandan Bagchee
Ohio State University
la******@cse.ohiodashstate.edu

Jul 18 '05 #1
1 2069
Could it have something to do with your PATH or CLASSPATH settings?

Here's a test script that works for me:

#!/usr/bin/env jython

from java import lang
from javax import swing

print "lang attributes: "

for attr in dir(lang):
print "\t%s" % attr

print
print "swing attributes: "

for attr in dir(swing):
print "\t%s" % attr

print
print "Good Bye!"

Note: both #!/usr/bin/env jython and #!/bin/env jython seem to work on the
OSU stdsun system...

Nandan wrote:
hello, can I ask a jython question here?

when I use the jython interpreter I have no problem with the statement:

from java import lang
from javax import swing

but when I put this in a script, I get a package not found error.
what am I doing wrong?

the script header is #!/bin/env jython

--
Nandan Bagchee
Ohio State University
la******@cse.ohiodashstate.edu


Jul 18 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Matt Newcomb | last post: by
3 posts views Thread by Sherrod Faulks | last post: by
6 posts views Thread by Mike Wimpe | last post: by
4 posts views Thread by Nadeem Mohsin | last post: by
7 posts views Thread by Jan Gregor | last post: by
1 post views Thread by tatamata | last post: by
2 posts views Thread by donkeyboy | last post: by
2 posts views Thread by sandip desale | last post: by
5 posts views Thread by sarup26 | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.