Results 1 to 2 of 2
  1. #1
    glaze24 is offline Member
    Join Date
    Nov 2010
    Posts
    1
    Rep Power
    0

    Default package does not exist error

    Hi,
    I am checking access modifiers by creating packages. My pgm has two packages p1 and p2. p1 has a base class "Base" with a protected method. p2 has the sub class "Sub" which is a child of "Base". I am trying to call the protected method from the child class. I have compiled and run the base class source file (no errors).When I compiled Sub class source file. I've gotten the error "package p1 does not exist". (so weird!!!) . Pls help me....


    Thanks in advance!!!

  2. #2
    JosAH's Avatar
    JosAH is offline Moderator
    Join Date
    Sep 2008
    Location
    Voorschoten, the Netherlands
    Posts
    13,386
    Blog Entries
    7
    Rep Power
    20

    Default

    Quote Originally Posted by glaze24 View Post
    Hi,
    I am checking access modifiers by creating packages. My pgm has two packages p1 and p2. p1 has a base class "Base" with a protected method. p2 has the sub class "Sub" which is a child of "Base". I am trying to call the protected method from the child class. I have compiled and run the base class source file (no errors).When I compiled Sub class source file. I've gotten the error "package p1 does not exist". (so weird!!!) . Pls help me....


    Thanks in advance!!!
    Try to compile both source files at once (i.e. supply both source files on the command line). Your classpath probably isn't set and my suggestion is the quickest way out for now.

    kind regards,

    Jos
    cenosillicaphobia: the fear for an empty beer glass

Similar Threads

  1. package jxl does not exist ??? any ideas
    By Macca07 in forum New To Java
    Replies: 5
    Last Post: 05-14-2012, 07:38 PM
  2. package javax.servlet does not exist :>
    By wildheart25c in forum Java Servlet
    Replies: 2
    Last Post: 02-17-2010, 12:02 AM
  3. package java.text does not exist
    By sknn in forum NetBeans
    Replies: 12
    Last Post: 02-03-2010, 03:14 PM
  4. package javax.servlet does not exist
    By nikhil2jan in forum Java Servlet
    Replies: 1
    Last Post: 01-04-2009, 04:32 PM
  5. package mj does not exist
    By PzK in forum New To Java
    Replies: 8
    Last Post: 12-03-2008, 10:30 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
  •