I don't know if this should be two threads or not, but I'm making it one.
First I got the Java SDK 1.4.2 and installed it (on Windows, BTW) and now I'm trying to get my first program to work. I copied it right out of my book,
Learning Java (from O'Reilly), and it is as follows:
Code:
public class Pre {
public static void main( String[] args ) {
System.out.println("Hi, everyone.");
}
}
I run "C:\j2sdk1.4.2_02\bin\javac Pre.java" and it works (I haven't bothered to set the path to include the Java bin directory). When I run "C:\j2sdk1.4.2_02\bin\java Pre" it thinks for a while and says "Exception in thread "main" java.lang.NoClassDefFoundError: Pre/Java". Can anyone tell me what's going wrong here?
Also, in
Learning Java, the author seems to think that Java is the greatest thing ever. I assume he's a bit biased, but I figured I'd find out whether this was true on my own.
I was using NetBeans, which was written entirely in Java, and I don't think I've ever used a slower program in my life. From what I understand of Java, the JVM code is being compiled "Just In Time." My diagnosis for NetBeans is that it's a decent program in need of good, old-fashioned compiling. I know I don't have a fast computer, but Photoshop runs twice as fast as NetBeans. Every time that I would go to another program and come back to NetBeans the hard drive would go into overdrive and it would freeze. Even during normal use the hard drive hardly ever stopped cranking. And nothing ran smoothly.
Is Java really all its supposed to be?