As far as I've been able to discern. The "cannot find symbol" compile error is a result of one of 2 mistakes.
1) The class name is spelled incorrectly
2) The class isn't in the same directory as the class trying to instantiate the object or the class isn't in the CLASSPATH variable.
I have a class called Item(already compiled in it's .class file), and it's in the same directory as Storefront.java. Storefront.java instantiates a new Item object, yet when I try to compile Storefront I get a "cannot find symbol error". Here's my bash commands to help illustrate the problem.
dan@dan-laptop:~/java/com/stonehambey/ecommerce$ ls
Item.class Item.java Storefront.java
dan@dan-laptop:~/java/com/stonehambey/ecommerce$ javac Storefront.java
Storefront.java:11: cannot find symbol
symbol : class Item
location: class com.stonehambey.ecommerce.Storefront
Item it = new Item(id, name, price, quant);
^
Storefront.java:11: cannot find symbol
symbol : class Item
location: class com.stonehambey.ecommerce.Storefront
Item it = new Item(id, name, price, quant);
^
2 errors
dan@dan-laptop:~/java/com/stonehambey/ecommerce$
Obviously I'm missing something about how packages and classpaths work, but I don't know what. Any help would be much appreciated. :)