File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Beginning Java and the fly likes error: cannot be accessed from outside package Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Murach's Java Servlets and JSP this week in the Servlets forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "error: cannot be accessed from outside package" Watch "error: cannot be accessed from outside package" New topic
Author

error: cannot be accessed from outside package

Rob Deer
Greenhorn

Joined: Jan 10, 2005
Posts: 17
I have this code that's giving me error.

/home/dev/WEB-INF/classes/db/mysqlconnector.java



when i compile this below,
/home/dev/WEB-INF/test.java
it gives me the error
mysqlconnector() is not public in db.mysqlconnector; cannot be accessed from outside package
mysqlconnector c = new mysqlconnector();


test.java


Any ideas on what's wrong?
[ February 10, 2007: Message edited by: Ester Wong ]
Anton Uwe
Ranch Hand

Joined: Jan 10, 2007
Posts: 122
Replace byin your mysqlconnector.java.
Rob Deer
Greenhorn

Joined: Jan 10, 2005
Posts: 17
Ah, thanks! I'm blind as a bat.
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: error: cannot be accessed from outside package
 
Similar Threads
WAMP/Java/MysqlConnector Issue
Help !!!!!!! Connection problems from you know where!
Servlets classes and borkers classes not compiling!
Servlets classes not compiling!.
can anyone help me using jspsmartupload to upload an image???