This week's book giveaways are in the iOS and Features new in Java 8 forums.
We're giving away four copies each of Barcodes with iOS: Bringing together the digital and physical worlds and Core Java for the Impatient and have the authors on-line!
See this thread and this one for details.
The moose likes Beginning Java and the fly likes cannot find symbol - compiler error? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Barcodes with iOS this week in the iOS forum
or Core Java for the Impatient in the Java 8 forum!

JavaRanch » Java Forums » Java » Beginning Java
Reply locked New topic

cannot find symbol - compiler error?

Anuradha Prasanna
Ranch Hand

Joined: Mar 09, 2006
Posts: 115
I have a java pgm, "" in "C:\MyProjects\beerV1" folder

and the "BeerExpert.class" file in "C:\MyProjects\beerV1\classes\com\example\model" folder

which contains,

package com.example.model;

so when i try compiling the "" as below i get the, "cannot find symbol" error as below,

C:\MyProjects\beerV1>javac -cp classes cannot find symbol
symbol : class BeerExpert
location: class test
new BeerExpert();

1 error

can anyone please tell me how to compile the "" file, which uses the "BeerExpert.class" file?

SCJP 6.0 90%
Henry Wong

Joined: Sep 28, 2004
Posts: 19305

Please do not crosspost -- it wastes people's time and effort.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
I agree. Here's the link:
subject: cannot find symbol - compiler error?