Re: Linked List program
On 10/2/2010 5:17 PM, DeAndrea Monroe wrote:
I am constructing a program that stores names and numbers in a
directory. I have constructed a portion of the code, that can be found
here http://code.google.com/p/cschelp/source/checkout, but I keep
getting the same error when I try to run or build the program.
avac *.java
Copy/paste error? The command to run the Java compiler is
usually "javac", not "avac".
The system cannot find the file specified.
java phonedir
The system cannot find the file specified.
I suspect you don't have Java and the Java Development Kit (JDK,
which includes javac and other essentials) installed on your system,
or if they're installed you haven't properly introduced them to your
command-line environment (e.g., by putting them on your "path"). What
happens if you just type
java
or
javac
at the command prompt, with no other parameters? Perhaps the system
is telling you that it can't find those programs, rather than telling
you "You've written bad Java."
I'm using the application SciTe.
Sorry; I have no idea what SciTe might be.
Incidentally, you'd do well to acquaint yourself with the usual
conventions for naming things in Java: Your class should probably be
PhoneDir or Phonedir (in PhoneDir.java or Phonedir.java). You'll
also want to break the bad habit of putting things in the default
package, but perhaps you're just beginning to learn the language and
haven't encountered the "package" statement yet. Also, there's the
wide and wonderful world of "generics" yet to open before you; those
undecorated Lists and LinkedLists are widely frowned upon -- but again,
perhaps that's a topic your class hasn't reached yet.
--
Eric Sosman
esosman@ieee-dot-org.invalid