Results 1 to 2 of 2
  1. #1
    ai_2007 is offline Member
    Join Date
    Jun 2007
    Posts
    21
    Rep Power
    0

    Default 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?

  2. #2
    JavaBean's Avatar
    JavaBean is offline Moderator
    Join Date
    May 2007
    Posts
    1,270
    Rep Power
    9

    Default

    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

  1. avoiding if statements
    By valoyivd in forum New To Java
    Replies: 1
    Last Post: 04-02-2008, 09:08 AM
  2. Help with actionPerformed Statements
    By wco5002 in forum New To Java
    Replies: 8
    Last Post: 03-26-2008, 04:02 AM
  3. Replies: 3
    Last Post: 02-12-2008, 11:03 AM
  4. Replies: 0
    Last Post: 09-28-2007, 12:59 PM
  5. Help with if else statements
    By zoe in forum New To Java
    Replies: 1
    Last Post: 07-24-2007, 07:56 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •