|
View:
New views
7 Messages
—
Rating Filter:
Alert me
|
|
|
NoClassDefFoundErrorHi,
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 Thanks |
|
|
Re: NoClassDefFoundErrorHow are you ruuning you program in command line? The problem is that you have some jar that need to be added to your classpath. When you run inside IDE, the IDE do that for you.
On 4/29/06,
John <johnbell@...> wrote: Hi, -- Atenciosamente, Michel Graciano KSI Soluções em Informática Ltda. http://www.jroller.com/page/hmichel http://translatedfiles.netbeans.org/index_pt_BR.html https://copypastehistory.dev.java.net/ https://jae.dev.java.net/ |
|
|
Re: NoClassDefFoundErrorMichel Graciano wrote: How are you ruuning you program in command line? The problem is that you have some jar that need to be added to your classpath. When you run inside IDE, the IDE do that for you. Thanks very much, even if I to add the classpath to my PATH environment variable, what I would like is a standalone program, how do I compile that in NetBeans? |
|
|
Re: NoClassDefFoundErrorOn 4/30/06, John <johnbell@...> wrote:
-- Atenciosamente, Michel Graciano KSI Soluções em Informática Ltda. http://www.jroller.com/page/hmichel http://translatedfiles.netbeans.org/index_pt_BR.html https://copypastehistory.dev.java.net/ https://jae.dev.java.net/ |
|
|
Re: NoClassDefFoundErrorWell not wanting to "expose" too much but could it be that you didn't select a main and as consequence your manifest file is left "bare" of the project main class?
John <johnbell@...> wrote: Hi,
Get amazing travel prices for air and hotel in one click on Yahoo! FareChase |
|
|
Re: NoClassDefFoundErrorAlso make sure you see all the jars that your application uses in the lib directory under the dist folder. cd /yourapp/dist java -jar yourapp.jar Hi,
Yahoo! Mail goes everywhere you do. Get it on your phone. |
|
|
Re: NoClassDefFoundErrorOn 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 |
| Free embeddable forum powered by Nabble | Forum Help |