WOW and Double WOW. I never dreamed my question would create such a
thread. I am honored by all your reponses. I will take to heart your
many suggestions and comments. I don't know why my one computer seemed
to have trouble installing Java. Nothing...absolutely nothing... was
in the bin directory and there were no "hidding" settings active for
the window.
SO I tried it on another and there it was. Go figure.......
Now perhaps someone can tell me a better book to use. The first
example in this current book ( see the title at the start of this
thread) is coded like this:
/*
Comments omitted
*/
class Example {
// Another comment
public static void main (string args[ ] ) {
System.out.println("This is a simple Java Program.");
}
}
And this is the error I get when I run javac example.java:
Exception in thread "main" java.lang.NoClassDefFoundError:
example/class
I don't want to have to spend any time debugging. It just aught to
work when you are learning. So what is a better book that is perhaps
more up-to-date. My has a copyright of 2002. IT is sort of
discouraging when even the book examples don't work. In some places in
the example it was hard to tell if a space existed between some things
like "main(string" or "main (string" but I got the error
regardless.
Thanks again to all
George Sullivan
Oliver said:
P.Hill said:
Lionel wrote:
P.Hill wrote:
Lionel wrote:
Good point. I had forgotten that you need to create projects,
So what[]s] so confusing about creating an area to place files.
Certainly a set of Chapter 1, Chapter 2 etc. projects seems like
very logical constructs to me and should to a newbie once they realize
they'd like to keep their first program safe before messing with their
second one.
Well yeah. If you take your time you can figure it out. But it is often a
stumbling block for newbies. They tend to get impatient and try some
totally different approach.
So using the command line and getting a classpath correct which is
provided by an IDE (just like the IDE may provides a JDK as you point out)
is supposed to be conceptually less difficult than picking a place to
organize files? Hmm, I'm not convinced.
If you're a complete newbie, and you don't even know what the concept of
compilation refers to, then I think the command line is easier. Why? Because
most tutorials will provide explicit step-by-step instructions on how to
compile from the command line from the three major OSes (Windows, Linux and
MacOSX). Most tutorials don't bother with instructions for IDEs because
there's so many of them, and even within a given product series, they vary
very quickly (Eclipse 3.2 has a whole bunch of new features that Eclipse 3.1
didn't have, for example).
Plus, the command line tends to have a lot less state than an IDE. With
Eclipse, for example, you have to make sure that you're in the "Java
perspective". You have to hope that the perspective is reset to its default
so that if you say some view is on the left hand side, it really will be on
the left hand side, and not on the right hand side.
- Oliver