473,395 Members | 1,891 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,395 software developers and data experts.

jython __init__.py and jar files

I was trying to run an example from the Jython Essentials book but kept getting
an error saying:

java package 'org.jdom.input' has no attribute 'SAXBuilder'

Apparently, it couldn't find the SAXBuilder class, even though I
had set the sys.path to the jar and it seemed to be finding the jar.

Eventually I extracted the files from the jar, but it still wasn't finding
the SAXBuilder class. Then I added __init__.py files to the 'org', 'jdom' and
'input' dirs and wallah!, everything works.

This leads me to a rather odd conclusion:

A real Java jar isn't going to work for Jython because it won't have __init__
files.

Has anyone else run into this? Is my conclusion correct or am I missing
something?
Jul 18 '05 #1
0 1322

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...
6
by: Dave Benjamin | last post by:
Hey good people, I've been doing a lot of simultaneous Jython and CPython programming lately, and just wanted to say, with no intended ill will toward any of the individuals who have been...
4
by: angel | last post by:
A java runtime environment includes jvm and java class (for example classes.zip in sun jre). Of course jython need jvm,but does it need java class. Thanx
5
by: davidmichaelkarr | last post by:
Aren't there boolean literals for "True" and "False" in Python (jython)? I can't get "true", "True", "false", or "False" to work. I ended up having to use "(1==1)" and "(1==0)".
2
by: didier.prophete | last post by:
Ok, so I know this is probably a common jython error, but somehow I can't seem to find an answer to this trivial problem. Ok, I have the following (simple) directory structure: $TOP/...
12
by: Mark Fink | last post by:
I wrote a Jython class that inherits from a Java class and (thats the plan) overrides one method. Everything should stay the same. If I run this nothing happens whereas if I run the Java class it...
3
by: donkeyboy | last post by:
All, I'm having issues installing Jython on Windows XP. I've looked on the web and this newsgroup but to no avail. Any suggestions? The shell listing is below: NB I've got Cygwin installed,...
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...
3
by: nmin | last post by:
Hi, I'm using Jython in combination with java. I wrote a jython skript, which calls a function from another jython module called library.py. So, executing the function genData() in skript...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.