473,326 Members | 2,104 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,326 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 2205
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 the jython code: import sys; from javax...
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 " + client.serverName, JOptionPane.PLAIN_MESSAGE) ...
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, these toolkits like Tkinter are so much better for...
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 idea mentioned on this page:...
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 classes. My application is a desktop app using swing...
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 "Delphi" way. But, it seems that I can drag and drop...
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 above my knowledge. Does anyone know what any of the...
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 porting Tcl/Tk application to Jython but not able to do...
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 are the areas where it is used? Swot
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.