Wrox Home  
Search P2P Archive for: Go

  Return to Index  

pro_java_server thread: main" java.lang.NoClassDefFoundError???


Message #1 by "frant turner" <seasundown@a...> on Fri, 27 Apr 2001 11:44:30
I have some java code (from a recent post java 2 
book) which compiles & displays trees & other 
graphical components fine. whereas the 
the very one I need
(does not even compile?  These  3 scenarios are 
depicted below: runtime error, classpath, and 
the one which doesnt even compile! Straight off
of your web site & the book CD.  

Is there any more recent & ported code to jdk1.3 
which shows tree examples going to jdbc oracle?
I really need to get that example working.  Or should
I install an old verion of jdk ?

--------------------------
I have jdk1.3 running & again it works well 
with all my other examples from books & web 
then there must be a problem with the cjava odes 
from this book.  Could it be this book ( probably 
written before Java2 was really out) had code 
which is to old to work?  I thought
this stuff was backward compatible.Anyway 
------------------
TIA!!!

The 3 examples follow...


---------------------------------------
D:\Java1.2Exp\jwiley\chp21>java TocTreePanel
Exception in thread "main" java.lang.NoClassDefFoundError: TocTreePanel
(wrong name: jwiley/chp21/TocTreePanel)
        at java.lang.ClassLoader.defineClass0(Native Method)
        at java.lang.ClassLoader.defineClass(ClassLoader.java:486)
        at
java.security.SecureClassLoader.defineClass(SecureClassLoader.java:111)
        at java.net.URLClassLoader.defineClass(URLClassLoader.java:248)
        at java.net.URLClassLoader.access$100(URLClassLoader.java:56)
        at java.net.URLClassLoader$1.run(URLClassLoader.java:195)
        at java.security.AccessController.doPrivileged(Native Method)
        at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:297)
        at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:286)
        at java.lang.ClassLoader.loadClass(ClassLoader.java:253)
        at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:313)
-----------------------------------------
 My classpath:
-----------------------------------------

;d:\sybase-install\ASEP\3pclass.zip;d:\sybase-
install\ASEP\monclass.zip;.;c:\m
ysql\jdbc\twz1\noopt;c:\SDKs\Java\Sun\javacheck;c:\jdk1.3;c:\jdk1.3
\src.jar;c:
\jdk1.3\lib;c:\jdk1.3\lib\dt.jar;c:\jdk1.3\lib\tools.jar;c:\jdk1.3
\jre\lib;D:\
ORANT\orb\classes\yoj.jar;D:\ORANT\orb\classes\share.zip;d:\Ora3
\orb\classes\y
oj.jar;d:\Ora3\orb\classes\share.zip
-------------------------------------------------
compile error...
------------------------------------------
D:\Java1.2Exp\jwiley\chp21>java TocFrame.java
Exception in thread "main" java.lang.NoClassDefFoundError: TocFrame/java

D:\Java1.2Exp\jwiley\chp21>javac TocFrame.java
TocFrame.java:33: cannot resolve symbol
symbol  : class TocTreePanel
location: class jwiley.chp21.TocFrame
        TocTreePanel tp = null;
        ^
TocFrame.java:36: cannot resolve symbol
symbol  : class TocTreePanel
location: class jwiley.chp21.TocFrame
            tp = new TocTreePanel(sTocFile);
                     ^
2 errors
-----------------------------------------------

  Return to Index