Results 1 to 2 of 2
- 06-28-2007, 05:21 PM #1Member
- Join Date
- Jun 2007
- Rep Power
Problems with packages (import statements)
I have created a few java classes for which is part of the whole main system which I am going to develop. The problem is, when I compile these classes, the error message that pops up
import es.agp.monitor.components.resources.ComponentInsta nceResource;
For example, for one of the classes I have included the above two import statements.
But when I compile and run the class, the error message that pops up says that
package es.agp.monitor.components does not exist
There are many other classes that have different types of packages, and ther e are also errors in these classes.
Why do these error messages pop up and how do I resolve them?
- 06-29-2007, 12:57 PM #2
Make sure that you placed the classes in those packages to the correct subdirectories. For example, you should put es.agp.monitor.components package under CURRENT_DIRECTORY/agp/monitor/components.
Check this document:
Java Package Tutorial (English version)
If you cant solve your problem, let us know the directory structure you have and the directory where you are running javac command.
- By valoyivd in forum New To JavaReplies: 1Last Post: 04-02-2008, 10:08 AM
- By wco5002 in forum New To JavaReplies: 8Last Post: 03-26-2008, 05:02 AM
- By sta2003 in forum New To JavaReplies: 3Last Post: 02-12-2008, 12:03 PM
- By JavaBean in forum Java TipReplies: 0Last Post: 09-28-2007, 01:59 PM
- By zoe in forum New To JavaReplies: 1Last Post: 07-24-2007, 08:56 PM