Click to See Complete Forum and Search --> : java.lang.noClassDefFoundError
merlin_bar
08-03-2002, 08:32 AM
I get this error...
java.lang.noClassDefFoundError
whenever I try to run forte for java. I have installed JDK 1.4.0 and exported the path for all users so why is this happpening? I can compilie with bash no problem.
Wolff
08-03-2002, 09:48 AM
Is this when compiling applets ?
Make sure the properties/execution is set right. There is an option there where, if you run it normally it says "external execution" .. change that to applet execution. This could fix it.
If this isn`t applet issue ... let me know, and I`ll try and figure something out, I use forte without any problems.
dmsantam
08-03-2002, 10:16 AM
put this at the end of ~/.bashrc
export JAVA_HOME=/usr/java/j2sdk1.4.0
export PATH=$JAVA_HOME/bin:$PATH
restart bash and then try it. :)
Karl_Marx
08-03-2002, 03:40 PM
in Windows, It may mean that you typed
Java your_file.class
instead of
Java your_file
your error may be there.
dmsantam
08-03-2002, 07:41 PM
in Windows, It may mean that you typed
Java your_file.class
instead of
Java your_file
the same goes for linux! this is a very likely error!
merlin_bar
08-04-2002, 11:04 AM
Thanks for all your replies lads,
The problem isn't with comiling or anything like that. I know the javac and java syntax and have been running apps that I wrote in kate and compiled in bash no problem.
But the forte IDE wont run.
The splash screen comes up and gives the messages "Loading JSP" etc.
But then a dialog pops up and says:
" A java.lang.NoClassFoundError exception has occured,
please report this at sun.com/ .../bugs.html and include the log that has been generated"
When I close the dialog I have to kill the forte4j splash.
I tried your suggestions too, but the problem must lie elsewhere.
truls
08-04-2002, 02:37 PM
Could you post the log that was generated. Most likely Forte is trying to load some classes that are in the Forte catalog structure, and are not in the classpath. There's more information about this in the error log that is generated.
merlin_bar
08-04-2002, 11:16 PM
The file is way too big to post here ( it's 22 k ) so I put it up on a website...
http://www.angelfire.com/linux/merlin_bar/index.html
truls
08-05-2002, 02:20 AM
The problem is that it can't find the DebuggerCallback class, which is weird because I'm pretty sure this lies in the tools.jar archive which is in your classpath(check that the file actually exists). I did a google, and I found a few others who had the same problem, but no-one has answered it yet.
I suggest you send the log to sun, as this is a yet unanswered question, and then post the solution here when you get it :D
If you have a fast line, and really want to check this, you could download the 1.3 version of java and set the classpath to that. I've solved some J2EE problems by downgrading my jdk. You could also check the tools.jar archive to see that the DebuggerCallback class really is there.
merlin_bar
08-05-2002, 11:08 AM
I have contacted sun with detailed info. I'll let you know how things go ( although they did not guarantee any support would be provided ).
If I find an alternative solution, I'll let you know.
ctlmd
02-29-2004, 11:38 AM
I'm having the same problem and suspect it's the CLASSPATH settings but have been unable to determine what they should be. I would appreciate any help.
blackrax
03-04-2004, 04:45 PM
hmm, well, having a morbid fascination with TUI:s (thank god for the charva library, and thank goddess for vim) i've never used forte. however, assuming your $CLASSPATH is correct (make sure it points to the actual jars, not just the dir) it may be overriden by forte's startup script? another, however unlikely, solution is a lacking "."/current dir in your classpath?
as dmsantam pointed out, make sure $JAVA_HOME is set, and confirm the validity of the path.
unfortunately, your log had been removed from angelfire - but maybe you could post the "essentials" of the log? or put it on the web again.
good luck,
//blackrax
[blackadde@demon gilot]# (echo -n export CLASSPATH=;find /usr/java/jars/ /usr/java/j2sdk/ -type f -name '*.jar' -exec echo -n {}: ";" ; echo . )