aspose file tools
The moose likes Beginning Java and the fly likes package visibility problem Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "package visibility problem" Watch "package visibility problem" New topic

package visibility problem

rewati raman
Ranch Hand

Joined: May 22, 2010
Posts: 62
Hi I am getting this error when i am compiling with this command: javac -classpath /home/rewati/Downloads/apache-tomcat-6.0.28/lib/servlet-api.jar:classes:. -d classes src/info/registration/web/

this is the error:

src/info/registration/web/ package info.registration.model does not exist
import info.registration.model.*;
src/info/registration/web/ package info.registration.model does not exist
2 errors
Process javac exited with code 1


here is my code

Christophe Verré

Joined: Nov 24, 2005
Posts: 14688

You need to put your src folder in your classpath, to tell the compiler where to find the info package. It looks like your are compiling from the root directory of src, so try with : javac -classpath /home/rewati/Downloads/apache-tomcat-6.0.28/lib/servlet-api.jar:classes:.:./src -d classes src/info/registration/web/

[My Blog]
All roads lead to JavaRanch
Don't get me started about those stupid light bulbs.
subject: package visibility problem