I am a newbie......I 've Linux , Java and Netbeans IDE.
The programs (*.class) into my folder "PgmSRC" work fine ( but I have to
write "package PgmSRC" into the *.java file ) while the programs into
other folders (that are contained in PgmSRC ) get "Exception in thread
"main" java.lang.NoclassDefFoundError " though I write "package
foldername".....
Thanks for your helps......
lando <landolini@yahoo.it> wrote in news:43f5f992$0$12589
$4fafbaef@reader3.news.tin.it:
> I am a newbie......I 've Linux , Java and Netbeans IDE.
> The programs (*.class) into my folder "PgmSRC" work fine ( but I have to
[quoted text clipped - 3 lines]
> foldername".....
> Thanks for your helps......
Please, don't use netbeans or any IDE when you're learning Java. If you're
a linux user you should be quite familiar with the command line already, so
use that. If you want you can read this group's archives for lots (and
lots) of discussions on why you should not use an IDE when first learning
Java. If you're willing to take my word for it, let me just say that
learning Java will be a lot easier if you don't also have to learn to use
an IDE.
I would advise you use your favourite text editor to create the source
files, and then just compile from the command line. Don't use packages
yet, they too complicate things when you should still be focussing on the
core. Move on to an IDE when you're comfortable enough with Java and
packages.
If you still want to know what's going on, the error above just means Java
can't find your compiled classes (*.class files). This can be fixed by
setting the classpath correctly, and making sure the class files are in the
correct directory. See http://www.mindprod.com/jgloss/classpath.html