posted 13 years ago
Hello Guys,
I don't where I'm going wrong in this problem. Below are details:
Below is my BeerExpert.java file which is stored at src/com/example/model
When I compile this file , it gets compile successfully
C:\Beer-V2>javac -d src\com\example\model BeerExpert.java
and create the .class file correctly in the directory classes/com/example/model
But ,when I try to compile BeerSelect.java (Which is at src\com\example\web), which is as below
It tells me that it can't find the package com.example.model as below
C:\MyProject\Beer-V2>javac -classpath "c:\Tomcat 6.0\lib\servlet-api.jar" -d classes src\com\example\web\BeerSelect.java
src\com\example\web\BeerSelect.java:3: package com.example.model does not exist
import com.example.model.*;
^
src\com\example\web\BeerSelect.java:15: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be=new BeerExpert();
^
src\com\example\web\BeerSelect.java:15: cannot find symbol
symbol : class BeerExpert
location: class com.example.web.BeerSelect
BeerExpert be=new BeerExpert();
^
3 errors
C:\MyProject\Beer-V2>
Thanks in advance