Forums Register Login

noClassDefFoundError

+Pie Number of slices to send: Send
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
+Pie Number of slices to send: Send
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.
+Pie Number of slices to send: Send
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
If you want to look young and thin, hang around old, fat people. Or this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com


reply
reply
This thread has been viewed 838 times.
Similar Threads
Running the java program
Runtime Exception@ Constructor
New Learner in Java
self executable jar
ejb hanging
More...

All times above are in ranch (not your local) time.
The current ranch time is
Mar 28, 2024 17:16:07.