I am trying the very first sample from Java's Programming Language book for course SL-275-SE6 called TestGreeting. Here is the code:
TestGreeting.java
// // Sample "Hello World" application //
public class TestGreeting { public static void main (String[] args) { Greeting hello = new Greeting(); hello.greet();
} }
Greeting.java
public class Greeting { public void greet() { System.out.println("hi"); } }
When I go to compile TestGreeting.Java, I get an error message 7: cannot find symbol symbol : class Greeting location : class TestGreeting Greeting hello = new Greeting();
I've tried the HelloWorldApp and it comiles and run class HelloWorldApp { public static void main(String[] args) { System.out.println("Hello World!"); // Display the string. } }
I don't have admin priviliges on my work computer. My jdk is installed on c:/Program Files/Java/jdk1.6.0_06/bin
My work directory is on h:/Java
I've been searching the error and the posts are pointing towards setpath. I've tried different commads but I am still not having any success.
Anyone has encountered this error - How can I resolve it?