Java Forums

Main Menu
Home
Today's Posts
FAQ
Search
Contact Us

Java Network
Linux Archive
Java Tips
Java Tips Blog

Sponsored Links





Welcome to the Java Forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community, you will:

  • have access to post topics
  • communicate privately with other members (PM)
  • not see advertisements between posts
  • have the possibility to earn one of our surprises if you are an active member
  • access many other special features that will be introduced later.

Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 06-28-2007, 06:21 PM
Member
 
Join Date: Jun 2007
Posts: 21
ai_2007 is on a distinguished road
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?
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-29-2007, 01:57 PM
JavaBean's Avatar
Moderator
 
Join Date: May 2007
Posts: 1,272
JavaBean is on a distinguished road
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.
Bookmark Post in Technorati
Reply With Quote
Sponsored Links
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
avoiding if statements valoyivd New To Java 1 04-02-2008 11:08 AM
Help with actionPerformed Statements wco5002 New To Java 8 03-26-2008 06:02 AM
Importing packages from the packages within same application. sta2003 New To Java 3 02-12-2008 01:03 PM
How to Execute SQL statements in Spring Framework JavaBean Java Tips 0 09-28-2007 02:59 PM
Help with if else statements zoe New To Java 1 07-24-2007 09:56 PM


All times are GMT +3. The time now is 04:22 PM.


VBulletin, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.
Copyright ©2006 - 2007, www.java-forums.org