File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes noClassDefFoundError Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "noClassDefFoundError" Watch "noClassDefFoundError" New topic
Author

noClassDefFoundError

Pradyut Bhattacharya
Ranch Hand

Joined: Aug 12, 2004
Posts: 63
hi,
i have jdk5 installed in win xp sp2
when i do java <filename>
i get the error on my machine
Exception in thread "main" java.lang.NoClassDefFoundError: <filename>
i correct it by doing
java -cp . <filename>
then it runs fine.

but on running a client ejb program on the command line
AppClient -client <filename>
i again get the error
WARNING: ACC003: Application threw an exception.
java.lang.NoClassDefFoundError: converter.ConverterHome
where converter.ConverterHome is contained in the jar file

i do not get a solution to this problem
how can i correct the above problem or the overall problem such that
when i give the command
java <filename>
i get the output simply
any helps
Pradyut


Pradyut
http://pradyut.tk/
Nigel Browne
Ranch Hand

Joined: May 15, 2001
Posts: 673
You need to set your classpath to point to the directory your class files are stored and also you will need to add each jar file individually to the classpath.
Edster Lamb
Greenhorn

Joined: Nov 14, 2004
Posts: 2
Hi
I had the exact same problem.
I had to do this ..

cd C:\PROGRA~1\Java\j2eetutorial\examples\src\ejb\converter
set APPCPATH=ConverterAppClient.jar
runclient -client ConverterApp.ear -name ConverterClient -textauth -Dj2eelogin.name=guest -Dj2eelogin.password=guest123

I hope that helps.
Cheers
Edster
===========================
Sydney Holiday Accommodation - Sydney Apartments
http://sydneyholidayaccommodation.com
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: noClassDefFoundError