hi folks,basically i am facing a problem importing a package,
dir structure is like
src
|---com
|---example
|---model
|---BeerExpert.java
package com.example.model;
import java.util.*;
public class BeerExpert
{
public List getBrands(String color)
{
//code goes here
}
}
src
|---com
|---example
|---web
|---BeerSelect.java
now in BeerSelect.java i am importing the BeerSelect class from the model directory
package com.example.web;
import com.example.model.*;
import javax.servlet.*;
import javax.servlet.http.*;
import java.io.*;
import java.util.*;
public class BeerSelect extends HttpServlet
{
public void doPost(HttpServletRequest request,HttpServletResponse response)throws IOException,ServletException
{
//code goes here
}
}
now at the time of compiling the BeerSelect.java,from cmd,by follwing command
e:\JAVA\Beer-v1\javac -classpath D:/tomcat/common/lib/servlet-api.jar -d classes src/com/example/web/BeerSelect.java
i am getting error
src\com\example\web\BeerSelect.java:3: package com.example.model does not exist
import com.example.model.*;
^
plz help