You need to specify the classpath property in the jar's manifest file.


-----Original Message-----
From: on behalf of Oti
Sent: Thu 11/25/2004 3:19 PM
To: Tony Maniaci; jython users
Subject: Re: [Jython-users] Executing jython compiled jars


IMHO the -cp or -classpath option is ignored when you use
  java -jar jarfile
I tried this lately, and

    Execute a program encapsulated in a JAR file. <snip>

    When you use this option, the JAR file is the source of all user
classes, and other user class path settings are ignored.

Best wishes,

--- Tony Maniaci <> wrote:

> Hi,
> I bundled jython compile classes in a jar but I get the error below.
> It
> runs fine when run the compiled classes directly. What am I missing
> in
> the jar? I'm on java 1,4,2 with jython 2.1
> C:\jython-2.1\jpywork2>jar cvfm ProcessMgr.jar manifest.txt *.class
> added manifest
> adding: ProcessMgrSW$_PyInner.class(in = 17032) (out= 7837)(deflated
> 53%)
> adding: ProcessMgrSW$MainFrame.class(in = 5547) (out= 2213)(deflated
> 60%)
> adding: ProcessMgrSW.class(in = 6497) (out= 2872)(deflated 55%)
> C:\jython-2.1\jpywork2>java -cp C:\jython-2.1\jython.jar;. -jar
> ProcessMgr.jar
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/python/core/PyObject

SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
Jython-users mailing list