473,791 Members | 3,137 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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_0 1\\bin\\javac.e xe', '-classpath',
'C:\\jython-2.1\\jython.jar ;;.\\jpywork;;C :\\jython-2.1\\Tools\\jyt honc;C:\\Docume nts
and Settings\\Value d
Customer\\Deskt op\\Grazer\\use batik\\.;C:\\jy thon-2.1\\Lib;C:\\jy thon-2.1',
'.\\jpywork\\us ebatik.java']
0 Note: * uses or overrides a deprecated API.
Note: Recompile with -Xlint:deprecati on 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\jytho nc\jythonc.py", line 5, in ?
File "C:\jython-2.1\Tools\jytho nc\main.py", line 301, in main
File "C:\jython-2.1\Tools\jytho nc\main.py", line 294, in writeResults
File "C:\jython-2.1\Tools\jytho nc\jar.py", line 98, in dump
File "C:\jython-2.1\Tools\jytho nc\jar.py", line 92, in dumpFiles
File "C:\jython-2.1\Tools\jytho nc\jar.py", line 111, in addPackage
java.util.zip.Z ipException: duplicate entry: org/python/core/PyMethod.class
at java.util.zip.Z ipOutputStream. putNextEntry(Un known Source)
at sun.reflect.Gen eratedMethodAcc essor30.invoke( Unknown Source)
at sun.reflect.Del egatingMethodAc cessorImpl.invo ke(Unknown Source)
at java.lang.refle ct.Method.invok e(Unknown Source)
at org.python.core .PyReflectedFun ction.__call__( PyReflectedFunc tion.java)
at org.python.core .PyMethod.__cal l__(PyMethod.ja va)
at org.python.core .PyObject.__cal l__(PyObject.ja va)
at org.python.core .PyInstance.inv oke(PyInstance. java)
at jar$py.addPacka ge$11(C:\jython-2.1\Tools\jytho nc\jar.py:111)
at jar$py.call_fun ction(C:\jython-2.1\Tools\jytho nc\jar.py)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyFunction.__c all__(PyFunctio n.java)
at org.python.core .PyInstance.inv oke(PyInstance. java)
at jar$py.dumpFile s$9(C:\jython-2.1\Tools\jytho nc\jar.py:92)
at jar$py.call_fun ction(C:\jython-2.1\Tools\jytho nc\jar.py)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyFunction.__c all__(PyFunctio n.java)
at org.python.core .PyInstance.inv oke(PyInstance. java)
at jar$py.dump$10( C:\jython-2.1\Tools\jytho nc\jar.py:98)
at jar$py.call_fun ction(C:\jython-2.1\Tools\jytho nc\jar.py)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyFunction.__c all__(PyFunctio n.java)
at org.python.core .PyInstance.inv oke(PyInstance. java)
at main$py.writeRe sults$8(C:\jyth on-2.1\Tools\jytho nc\main.py:294)
at main$py.call_fu nction(C:\jytho n-2.1\Tools\jytho nc\main.py)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyFunction.__c all__(PyFunctio n.java)
at main$py.main$9( C:\jython-2.1\Tools\jytho nc\main.py:301)
at main$py.call_fu nction(C:\jytho n-2.1\Tools\jytho nc\main.py)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyFunction.__c all__(PyFunctio n.java)
at org.python.core .PyObject.invok e(PyObject.java )
at org.python.pyco de._pyx0.f$0(C: \jython-2.1\Tools\jytho nc\jythonc.py:5 )
at
org.python.pyco de._pyx0.call_f unction(C:\jyth on-2.1\Tools\jytho nc\jythonc.py)
at org.python.core .PyTableCode.ca ll(PyTableCode. java)
at org.python.core .PyCode.call(Py Code.java)
at org.python.core .Py.runCode(Py. java)
at org.python.core .__builtin__.ex ecfile_flags(__ builtin__.java)
at org.python.util .PythonInterpre ter.execfile(Py thonInterpreter .java)
at org.python.util .jython.main(jy thon.java)

java.util.zip.Z ipException: java.util.zip.Z ipException: 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;b atik-1.5.1/batik-svgpp.jar;
batik-1.5.1/batik-ttf2svg.jar;bat ik-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;b atik-1.5.1/lib/batik-gui-util.jar;batik-1.5.1/lib/batik-gvt.jar;
batik-1.5.1/lib/batik-parser.jar;bati k-1.5.1/lib/batik-script.jar;bati k-1.5.1/lib/batik-svg-dom.jar;
batik-1.5.1/lib/batik-svggen.jar;bati k-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.ja r;batik-1.5.1/lib/xml-apis.jar;
batik-1.5.1/lib/jython.jar;


Jul 18 '05 #1
1 1650
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***@brunningo nline.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
7091
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 exception , any help is very much appreciated, thanks ......java.util.zip.ZipExce ption: duplicate entry: META-INF/ java.util.zip.ZipException: duplicate entry: META-INF/ at java.util.zip.ZipOutputStream.putNextEntry(ZipOutputStream.java:160)...
0
1104
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 in this group is OK. Thanks, Raghu.
13
2193
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. Just the html code gives message. Any ideas?
0
1121
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 ImportError upon first Java import. How can I fix this? -- Henri Sivonen hsivonen@iki.fi
1
1686
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 a.run b.go home c.stay there when a option is selected a new option is presented.
1
1257
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 main class file, I keep getting the error: Exception in "main" thread, NoClassDefFoundError. When I just use "java gui" (gui.class is the bytecode file), it flags an error on org.python.core.PyObject. If add jython.jar to the classpath, it gives me...
1
1277
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 working fine in 'interpreted mode'. I now want to compile it into Java classes but I get the following error: Traceback (innermost last): File "/usr/share/jython/Tools/jythonc/jythonc.py", line 5, in ? File...
3
1132
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 client side. they close either by the user or by a timer. So on the client computer, I have form1 running. The label will pop up on top of Form 1. Sometimes Form2 will show before the label timer close the label. So the label is now stuck and...
11
3388
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 to work out how to start on a solution. I have of course used a varienty of componets, mostly radio buttons with "button" appearence.
0
9669
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9515
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10427
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10207
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10155
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9995
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7537
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5431
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
2
3718
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.