Results 1 to 2 of 2
- 06-28-2007, 04:21 PM #1
Member
- Join Date
- Jun 2007
- Posts
- 21
- Rep Power
- 0
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.Information;
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, 11:57 AM #2
Hi,
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.
Similar Threads
-
avoiding if statements
By valoyivd in forum New To JavaReplies: 1Last Post: 04-02-2008, 09:08 AM -
Help with actionPerformed Statements
By wco5002 in forum New To JavaReplies: 8Last Post: 03-26-2008, 04:02 AM -
Importing packages from the packages within same application.
By sta2003 in forum New To JavaReplies: 3Last Post: 02-12-2008, 11:03 AM -
How to Execute SQL statements in Spring Framework
By JavaBean in forum Java TipReplies: 0Last Post: 09-28-2007, 12:59 PM -
Help with if else statements
By zoe in forum New To JavaReplies: 1Last Post: 07-24-2007, 07:56 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks