« Return to Thread: NoClassDefFoundError

Re: NoClassDefFoundError

by Michael Powe-2 :: Rate this Message:

Reply to Author | View in Thread

On Sat, Apr 29, 2006 at 07:56:43PM -0700, John wrote:
> Hi,
>
> Using Windows XP SP2, netbeans 5.0 update 6
 
> Please bare with me while I ask a couple dumb questions. The first has
> to do with release .jars vs ide debug runs. Why does my application run
> when I press F5, but if I compile it with F11 and run it from the
> command line I get the following error:
 
> Exception in thread "main" java.lang.NoClassDefFoundError:
> org/apache/batik/tran
> scoder/image/PNGTranscoder

When you specify an external library in the configuration of a
project, NB should copy that library into dist/lib when you build the
application.  It should then add a classpath entry to the manifest so
that your application knows to look in lib.  It looks like that has
not happened.

Look in the dist directory and verify that lib/batik-transcoder.jar is
there ((and any other necessary libraries).  then open up the jar file
in winzip or some similar tool and verify that the Manifest has a
classpath entry pointing to lib.

I have had some intermittent problems with NB not properly completing
the process I just described.  If you do these things manually,
however, the jar will execute as expected.

Thanks.

mp

--
Michael Powe michael@... Naugatuck CT USA
"I wrote what I did because as a woman, as a mother, I was oppressed
and brokenhearted with the sorrows and injustice I saw, because as a
Christian I felt the dishonor to Christianity, -- because as a lover
of my country, I trembled at the coming day of wrath." -- H.B. Stowe


attachment0 (196 bytes) Download Attachment

 « Return to Thread: NoClassDefFoundError