In a couple of days I have to take this silly programming test to advance to senior status in my computer science program. We have to compile on the command line and am getting weird compile errors with a practice exam written over a year ago. The strange thing is it compiles fine(minus a few genrics related warnings)with eclipse), but I cannot use that in the test.
What is happening is the compiler can not find certain classes/interfaces that are pre-written. It works with 1.4 but not 1.5, and I have to use 1.5 for the test.
Here is the Node class, and List interface. When compiled seperately, there are no errors/warnings.
Here is the code for LinkedList, an abstract class. The errors that it generates are:
LinkedList.java:17: cannot find symbol symbol: class List public abstract class LinkedList implements List ^ LinkedList.java:19: cannot find symbol symbol : class Node location: class LinkedList protected Node head; ^ LinkedList.java:23: cannot find symbol symbol : class Node location: class LinkedList head = new Node(null, null); //dummy head node ^ LinkedList.java:46: cannot find symbol symbol : class Node location: class LinkedList Node cur, prev; ^ LinkedList.java:69: cannot find symbol symbol : class Node location: class LinkedList Node cur = head.getNext();
I realize that some of the methods are not implemented, but that is not what the errors are about. There are no packages and all .java files are in the same folder.
I even tried to create very simple classes to see if I could get those to work, but nope.
I am sure the problem is something simple, but any help will be appreciated! [ March 01, 2006: Message edited by: Rusty Shackleford ]
"Computer science is no more about computers than astronomy is about telescopes" - Edsger Dijkstra
You've most likely got the CLASSPATH environment variable set, and your setting doesn't include "." (which means 'the current directory.') The default when the environment variable is unset is (effectively) just "." and nothing else.