Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:

cannot find symbol - compiler error?

 
Ranch Hand
Posts: 115
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
I have a java pgm, "test.java" 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 "test.java" as below i get the, "cannot find symbol" error as below,

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

1 error

can anyone please tell me how to compile the "test.java" file, which uses the "BeerExpert.class" file?
 
author
Posts: 23958
142
jQuery Eclipse IDE Firefox Browser VI Editor C++ Chrome Java Linux Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Report post to moderator
Please do not crosspost -- it wastes people's time and effort.


https://coderanch.com/t/485864/Programmer-Certification-SCJP/certification/cannot-find-symbol-compiler-error

Henry
 
Don't get me started about those stupid light bulbs.
    Bookmark Topic Watch Topic
  • New Topic