472,351 Members | 1,592 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,351 software developers and data experts.

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 2142
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Matt Newcomb | last post by:
G'day, Hi. I'm new to jython/python and am trying to interface a jython script with some java code that produces property change events. Here's...
3
by: Sherrod Faulks | last post by:
I'm using Jython and in the python script I do: from javax import swing result = javax.swing.JOptionPane.showInputDialog(wC, cmd,"Prompt from "...
6
by: Mike Wimpe | last post by:
Other than being used to wrap Java classes, what other real use is there for Jython being that Python has many other GUI toolkits available? Also,...
4
by: Nadeem Mohsin | last post by:
Me and a couple of friends have been thinking of doing something involving Python for our final year undergrad project. We're considering the first...
7
by: Jan Gregor | last post by:
Hello folks I want to apply changes in my source code without stopping jython and JVM. Preferable are modifications directly to instances of...
1
by: tatamata | last post by:
Hello. I installed NetBeans, Jython and Coyote. I hoped that I could use Swing GUI builder intergrated in NetBeans (Matisse?) with Jython in...
2
by: donkeyboy | last post by:
All, I've tried the jythonc compiler to try and create an applet to see how it works, but I get a number of Java compile errors that are way...
2
by: sandip desale | last post by:
Dear All, We have a Tcl/Tk application written using Python 2.2. Using this application we want to call some customizable Java APIs. I tried...
5
by: sarup26 | last post by:
Hello .. I would like to know more about Python and Jython? What is the difference between both of them? What is the future for Jython and which...
0
better678
by: better678 | last post by:
Question: Discuss your understanding of the Java platform. Is the statement "Java is interpreted" correct? Answer: Java is an object-oriented...
0
by: Naresh1 | last post by:
What is WebLogic Admin Training? WebLogic Admin Training is a specialized program designed to equip individuals with the skills and knowledge...
0
by: antdb | last post by:
Ⅰ. Advantage of AntDB: hyper-convergence + streaming processing engine In the overall architecture, a new "hyper-convergence" concept was...
2
by: Matthew3360 | last post by:
Hi, I have a python app that i want to be able to get variables from a php page on my webserver. My python app is on my computer. How would I make it...
0
by: AndyPSV | last post by:
HOW CAN I CREATE AN AI with an .executable file that would suck all files in the folder and on my computerHOW CAN I CREATE AN AI with an .executable...
0
by: Arjunsri | last post by:
I have a Redshift database that I need to use as an import data source. I have configured the DSN connection using the server, port, database, and...
0
hi
by: WisdomUfot | last post by:
It's an interesting question you've got about how Gmail hides the HTTP referrer when a link in an email is clicked. While I don't have the specific...
0
by: Matthew3360 | last post by:
Hi, I have been trying to connect to a local host using php curl. But I am finding it hard to do this. I am doing the curl get request from my web...
0
by: Carina712 | last post by:
Setting background colors for Excel documents can help to improve the visual appeal of the document and make it easier to read and understand....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.