Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Default Package

Status
Not open for further replies.

mcm103

Technical User
Sep 28, 2001
20
US
I have a servlet calling methods from a user-definded class. The java file and its related class file are in the same folder as my servlet. When I try to create new objects

MyClass NewObject = new MyClass();

I receive an error that it cannot resolve symbol. I just started to code again in Java after a couple of months so I am a little rusty.
 
My class have the following import statment.

import Order;

I realize techincally I should not need to import this class because it should be part of the default package.

However I am getting cannot resolve symbol errors when I try to compile my code.

OrderEntry1.java:146: cannot resolve symbol
symbol : class Order
location: class OrderEntry1
Order myOrder = new Order();
^
 
When you compile, try adding a . to the beginning of the classpath argument:

javac -classpath .;<whatever> OrderEntry1.java


 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top