File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Servlets and the fly likes referring other classes ... Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Servlets
Bookmark "referring other classes ..." Watch "referring other classes ..." New topic

referring other classes ...

Bala Krishniah
Ranch Hand

Joined: Dec 14, 2000
Posts: 81
I am trying to create and small test application in Tomcat. I have 2 public classes, both in the same package. Class 1 reffers to class 2.
My directory stucture is as follows...
class 1:
package com.catalog.ch05;
public class Catalog
//referrs to class 2
private Item it = new Item();
class 2:
package com.catalog.ch05;
public class Item{...}
But when I compile class 1 (, it is throwing error. saying, the class 2 is not recognized. The error is... cannot resolve symbol
symbol : class Item
location: class com.catalog.ch05.catalog
items.addElement(new Item());
What is the problem?...I appriciate the help.
Bala Krishniah
Ranch Hand

Joined: Dec 14, 2000
Posts: 81
Sorry, I guess this is the wrong place to post the above
I agree. Here's the link:
subject: referring other classes ...
It's not a secret anymore!