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

Stuck on Jythonc --all w/ ZipException PyMethod

I'm getting started working with Jython (hope this is an ok group for
the question), and ran into a stumbling block using the jythonc tool.

It is a fairly simple Jython script which uses the Apache Batik SVG
library, imports the SVG Canvas, and puts up a simple Swing interface to
let the user load and display an SVG file. (I translated the script from
a Batik Java example.) The script runs fine under jython, but so far
I've been unable to get a working jar file using jythonc.

After various problems involving CLASSPATH and the registry (protected
members not showing up), it is persistently giving a ZipException:
Duplicate entry error on the PyMethod class. Altering the CLASSPATH
seems to have no effect on the problem.

Is this a problem between jythonc and newer jvms? I've also tried with
j2sdk 1.4.2_05, with the same results.

I've exhausted other means, and at my wits end.
Thanks in advance for any pointers.

My command line is:

C:\jython-2.1\jythonc.bat --compiler C:\jdk1.5.0_01\bin\javac.exe --all
-j usebatik.jar usebatik.py
The output is:

processing usebatik

Required packages:
javax.swing
org.w3c.dom
java.awt.event
java.lang
java.io
org.apache

Creating adapters:
java.awt.event.ActionListener used in usebatik

Creating .java files:
usebatik module

Compiling .java to .class...
Compiling with args: ['C:\\jdk1.5.0_01\\bin\\javac.exe', '-classpath',
'C:\\jython-2.1\\jython.jar;;.\\jpywork;;C:\\jython-2.1\\Tools\\jythonc;C:\\Documents
and Settings\\Valued
Customer\\Desktop\\Grazer\\usebatik\\.;C:\\jython-2.1\\Lib;C:\\jython-2.1',
'.\\jpywork\\usebatik.java']
0 Note: * uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecation for details.
Note: Some input files use unchecked or unsafe operations.
Note: Recompile with -Xlint:unchecked for details.

Building archive: usebatik.jar
Tracking java dependencies:

Traceback (innermost last):
File "C:\jython-2.1\Tools\jythonc\jythonc.py", line 5, in ?
File "C:\jython-2.1\Tools\jythonc\main.py", line 301, in main
File "C:\jython-2.1\Tools\jythonc\main.py", line 294, in writeResults
File "C:\jython-2.1\Tools\jythonc\jar.py", line 98, in dump
File "C:\jython-2.1\Tools\jythonc\jar.py", line 92, in dumpFiles
File "C:\jython-2.1\Tools\jythonc\jar.py", line 111, in addPackage
java.util.zip.ZipException: duplicate entry: org/python/core/PyMethod.class
at java.util.zip.ZipOutputStream.putNextEntry(Unknown Source)
at sun.reflect.GeneratedMethodAccessor30.invoke(Unkno wn Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Un known Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at org.python.core.PyReflectedFunction.__call__(PyRef lectedFunction.java)
at org.python.core.PyMethod.__call__(PyMethod.java)
at org.python.core.PyObject.__call__(PyObject.java)
at org.python.core.PyInstance.invoke(PyInstance.java)
at jar$py.addPackage$11(C:\jython-2.1\Tools\jythonc\jar.py:111)
at jar$py.call_function(C:\jython-2.1\Tools\jythonc\jar.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyFunction.__call__(PyFunction.jav a)
at org.python.core.PyInstance.invoke(PyInstance.java)
at jar$py.dumpFiles$9(C:\jython-2.1\Tools\jythonc\jar.py:92)
at jar$py.call_function(C:\jython-2.1\Tools\jythonc\jar.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyFunction.__call__(PyFunction.jav a)
at org.python.core.PyInstance.invoke(PyInstance.java)
at jar$py.dump$10(C:\jython-2.1\Tools\jythonc\jar.py:98)
at jar$py.call_function(C:\jython-2.1\Tools\jythonc\jar.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyFunction.__call__(PyFunction.jav a)
at org.python.core.PyInstance.invoke(PyInstance.java)
at main$py.writeResults$8(C:\jython-2.1\Tools\jythonc\main.py:294)
at main$py.call_function(C:\jython-2.1\Tools\jythonc\main.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyFunction.__call__(PyFunction.jav a)
at main$py.main$9(C:\jython-2.1\Tools\jythonc\main.py:301)
at main$py.call_function(C:\jython-2.1\Tools\jythonc\main.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyFunction.__call__(PyFunction.jav a)
at org.python.core.PyObject.invoke(PyObject.java)
at org.python.pycode._pyx0.f$0(C:\jython-2.1\Tools\jythonc\jythonc.py:5)
at
org.python.pycode._pyx0.call_function(C:\jython-2.1\Tools\jythonc\jythonc.py)
at org.python.core.PyTableCode.call(PyTableCode.java)
at org.python.core.PyCode.call(PyCode.java)
at org.python.core.Py.runCode(Py.java)
at org.python.core.__builtin__.execfile_flags(__built in__.java)
at org.python.util.PythonInterpreter.execfile(PythonI nterpreter.java)
at org.python.util.jython.main(jython.java)

java.util.zip.ZipException: java.util.zip.ZipException: duplicate entry:
org/python/core/PyMethod.class
FYI, my CLASSPATH is:

SET CLASSPATH=batik-1.5.1/batik.jar;batik-1.5.1/batik-squiggle.jar;
batik-1.5.1/batik-rasterizer.jar;batik-1.5.1/batik-slideshow.jar;batik-1.5.1/batik-svgpp.jar;
batik-1.5.1/batik-ttf2svg.jar;batik-1.5.1/lib/batik-awt-util.jar;batik-1.5.1/lib/batik-bridge.jar;
batik-1.5.1/lib/batik-css.jar;batik-1.5.1/lib/batik-dom.jar;batik-1.5.1/lib/batik-ext.jar;
batik-1.5.1/lib/batik-extension.jar;batik-1.5.1/lib/batik-gui-util.jar;batik-1.5.1/lib/batik-gvt.jar;
batik-1.5.1/lib/batik-parser.jar;batik-1.5.1/lib/batik-script.jar;batik-1.5.1/lib/batik-svg-dom.jar;
batik-1.5.1/lib/batik-svggen.jar;batik-1.5.1/lib/batik-swing.jar;batik-1.5.1/lib/batik-transcoder.jar;
batik-1.5.1/lib/batik-util.jar;batik-1.5.1/lib/batik-xml.jar;batik-1.5.1/lib/js.jar;
batik-1.5.1/lib/pdf-transcoder.jar;batik-1.5.1/lib/xerces_2_5_0.jar;batik-1.5.1/lib/xml-apis.jar;
batik-1.5.1/lib/jython.jar;


Jul 18 '05 #1
1 1634
On Wed, 02 Mar 2005 14:13:48 GMT, Mitch Amiano <ma*****@nc.rr.com> wrote:
I'm getting started working with Jython (hope this is an ok group for
the question), and ran into a stumbling block using the jythonc tool.


Well, I'm sure that no one is going to object to Jython questions
here, but you might get more response on the Jython users list:

http://lists.sourceforge.net/lists/l...o/jython-users

--
Cheers,
Simon B,
si***@brunningonline.net,
http://www.brunningonline.net/simon/blog/
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Geetu | last post by:
I am trying to jar up a file and getting this exception, not sure what could be wrong. The same piece of code works fine in few machines but there is one machine where this piece of code gives this...
0
by: Raghuram | last post by:
Hi, I posted the following in Jython users list more than a month ago. But sadly, it hasn't elicited any response. I hope I can get some information in this group. I hope posting Jython question...
13
by: John Howard | last post by:
I have the following in a jythonc program to be executed in a html file. f1 = open("filename","r") I get message about filePermission read error. Program compiles and jar file is created....
0
by: Henri Sivonen | last post by:
I have a Jython script that uses Java classes and runs fine using jython. It also compiles using jythonc. However, when I try to run the compiled program with the same CLASSPATH, I get an...
1
by: jessebasketball | last post by:
i am a very beginner programmer and am stuck on a very simple problem. I am trying to make a game where the user is presented with a scenerio and options. ie you are standing in the parking lot...
1
by: tac-tics | last post by:
I've got a nice jython application that I wish to freeze. After playing around with flag settinsg on jythonc, I managed to get it to compile without warnings or errors, but when I try to run my...
1
by: Ian Vincent | last post by:
I cannot find a Jython newsgroup, so apologies in advance if this question has been posted to the wrong group. Just written my first Jython program (previously written Python ones) and it is...
3
by: =?Utf-8?B?UnVkeQ==?= | last post by:
Hello all! I'm having a problem with a stuck label. I have two applications, one that runs on a server, the other a client. The server application controls all of the forms that open on the...
11
by: Peted | last post by:
Im using c# 2005 express edition Ive pretty much finished an winforms application and i need to significantly improve the visual appeal of the interface. Im totaly stuck on this and cant seem...
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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.