Manuel McLure wrote:
... D'OH.Phill wrote:
[EMAIL PROTECTED] java $ java Test.class Exception in thread "main" java.lang.NoClassDefFoundError: Test/class/
Try
export CLASSPATH=.:${CLASSPATH} java Test
When you run the Java class, you give it just the name of the class without the extension. If you say "java Test.class" it's going to try to find a class "class" in a package "Test" - i.e. "Test/class.class" as the filename to run.
Thanks for that and for the eclipse suggestion, which is merging as we speak.
I seriously suggest you have a go at netbeans (the opensource basis for Sun's One studio) too. The latest and greatest daily build of the 4.1 will have most of the functionality of eclipse and I have found it works better out of the box. I like it more, to be quite honest, and it is a real shame that the ebuild maintainer has not really kept up with releases (in a few months when I start working in Java every day I will maybe take it over...). It is more friendly I find for beginners and the site is more oriented towards users than company advertising people - everyone and his dog seems to want to be on the board, and that seems to be all the website caters for. Netbeans is almost exclusively a Sun + OSS affair (much like OO.org) and so seems to me to have more continuity. It may be a permissions thing (seeing as eclipse was emerged, and netbeans was just untarred) but heaps of things just simply don't work for me in eclipse.
You are probably aware of the IBM vs Sun rivalry over Java, and with all the publicity eclipse has been getting Sun finally decided they would throw some money at packaging (website et al) and a few more programmers. They are basically the same principle though...
Cheers
Antoine
ps. Netbeans has moved more in the last 6 months (since the money started...) than in the previous 3 or so years. It is really racing forward. Keep an eye out even if you decide not to try it now.
-- [email protected] mailing list
