• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

package visibility problem

 
Ranch Hand
Posts: 62
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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






 
Sheriff
Posts: 14691
16
Eclipse IDE VI Editor Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
reply
    Bookmark Topic Watch Topic
  • New Topic