I am trying to compile the following
java classes which are arranged in a package structure.
1.
Servlet class "BeerSelect002Servlet.java" is inside package
2. The above servlet class calls a plain Java File "BeerExpert.java" that resides inside subdirectory "model"
I am trying to pre-compile the servlet class along with the supporting java file and then place the compiled class files on App server.
The above servlet class calls the Java File below that is inside subdirectory "model"
Now at command line, I am at C:\Program Files\.............\html\classes\com\MVCBasedForms>javac Version002\BeerSelect002Servlet.java
I am unable to compile and keep getting the following error
BeerSelect002Servlet.java:7:
package com.MVCBasedForms.Version002.model does not exist
import com.MVCBasedForms.Version002.model.*;
^
BeerSelect002Servlet.java:26: cannot resolve symbol
symbol : class BeerExpert
location: class com.MVCBasedForms.Version002.BeerSelect002Servlet
BeerExpert be = new BeerExpert();
^
BeerSelect002Servlet.java:26: cannot resolve symbol
symbol : class BeerExpert
location: class com.MVCBasedForms.Version002.BeerSelect002Servlet
BeerExpert be = new BeerExpert();
I have tried variations of C:\Program Files\.............\html\classes\com\MVCBasedForms\Version002> javac BeerSelect002Servlet.java
But the compiler gives the same error. Eventhough I have placed the 2 Java Files to match the respective package statements, the compiler still does not recognize the com.MVCBasedForms.Version002.model package.
Thanks for your time and help.
Regards
Subir