Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / April 2006

Tip: Looking for answers? Try searching our database.

java.lang.NoClassDefFoundError: MainWindow$1?

Thread view: 
jing - 05 Apr 2006 13:15 GMT
hi all.

i'm trying to compile a source package, which is needed for my
graduation design. here is its
url:http://gist.cs.berkeley.edu/libgist-2.0/libgist-2.0.tar.gz,
now, i've almost reached the last step: make amdb with the utility
java. when i tried to run amdb.bat including the java command, the
intepreter gave me the following message:

D:\SpatialDatabase\GiST\tools\libgist\bin>java -classpath
"D:\SpatialDatabase\Gi
ST\tools\libgist_\libgist\src\gui;D:\SpatialDatabase\GiST\tools\libgist_\libgist
\src\analysis;D:\SpatialDatabase\GiST\tools\libgist_\libgist\src\amdbgist;D:\Spa
tialDatabase\GiST\tools\libgist_\libgist\src\treeview;D:\jdk1.1.8\lib\classes.zi
p;D:\Swing-1.1.1\swingall.jar" MainWindow
java.lang.NoClassDefFoundError: MainWindow$1
       at MainWindow.<init>(MainWindow.java:47)
       at MainWindow.main(Compiled Code)

here MainWindow$1.class was created at the same time of MainWindow.
i don't know what does this error mean. actually, i know little about
java.

any help would be most appreciated.

jing.
Thomas Fritsch - 05 Apr 2006 16:37 GMT
> when i tried to run amdb.bat including the java command, the
> intepreter gave me the following message:
[quoted text clipped - 12 lines]
> i don't know what does this error mean. actually, i know little about
> java.
It means that java tried to get a file "Main$1.class", but didn't find it.
From the error message you also see, that the error occured inside a method
of the MainWindow class. You therefore know, that java *did* find a file
"MainWindow.class", although you don't actually know where.

May be in your "-classpath ..." the directory containing "Main.class" *and*
"Main$1.class" is missing. May also be you copied your file
"MainWindow.class" from one directory into another, but forgot to copy file
"MainWindow$1.class".

Signature

"Thomas:Fritsch$ops.de".replace(':', '.').replace('$', '@')

Thomas Fritsch - 05 Apr 2006 16:46 GMT
[...]
>> java.lang.NoClassDefFoundError: MainWindow$1
>>         at MainWindow.<init>(MainWindow.java:47)
>>         at MainWindow.main(Compiled Code)
[...]
Arrgh, I meant "MainWindow", not "Main". Sorry for the confusion.

> It means that java tried to get a file "Main$1.class", but didn't find it.
         ...  tried to get a file "MainWindow$1.class", but didn't find it.
> From the error message you also see, that the error occured inside a
> method of the MainWindow class. You therefore know, that java *did* find a
> file "MainWindow.class", although you don't actually know where.
>
> May be in your "-classpath ..." the directory containing "Main.class"
                       ... the directory containing "MainWindow.class"
> *and* "Main$1.class" is missing. May also be you copied your file
 *and* "MainWindow$1.class" is missing.
> "MainWindow.class" from one directory into another, but forgot to copy
> file "MainWindow$1.class".

Signature

"Thomas:Fritsch$ops.de".replace(':', '.').replace('$', '@')

pansy4u - 08 Apr 2006 04:21 GMT
Yes, you are right, Thomas. I did copied "MainWindow.class" from one
directory into another, but forgot to copy "Mainwindow$1.class"
together. But even if i copied them all to the target directory, the
*same* error occured again!
I'll check the whole compling procedure.
Thank you, Thomas!

jing.


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.