Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

package visibility problem

 
rewati raman
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/Register.java

this is the error:

src/info/registration/web/Register.java:2: package info.registration.model does not exist
import info.registration.model.*;
^
src/info/registration/web/Register.java:17: package info.registration.model does not exist
info.registration.model.NewUser.reg(firstname,lastname,sex,email,"fytf");
^
2 errors
Process javac exited with code 1

[/code]

here is my code






 
Christophe Verré
Sheriff
Posts: 14691
16
Eclipse IDE Ubuntu VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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/Register.java
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic