DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2

Hybrid View

  1. #1
    Ricky Guest

    compiling/debugging question


    I have recently begun studying Java and understand the concept and functationality
    of compiling the Java file and the creation of the class file. However,
    in the event that I cannot successfully compile a Java file, I am essentially
    stuck. I am using JDK 1.2.1 and JBuilder as a debugger. In running the
    following lines:


    public void init() {
    Rectgl r = new Rectgl(10,5,Color.red);
    Square s = new Square(10,Color.blue);
    Circle c = new Circle(20,Color.yellow);
    Square s2 = new Square(40,Color.green);
    add(r);
    add(s);
    add(c);
    add(s2);
    add(new PixLabel(r));
    add(new PixLabel(s));
    add(new PixLabel(c));
    add(new PixLabel(s2));

    I received a debug error in JBuilder stating:

    "Error (11)class Rectgl not found in class PixApplet"

    This error occurs for all of the referenced shapes.
    Looks as if it isn't pointing to some necessary files or something? I don't
    know, can anyone help?




  2. #2
    Alan Guest

    Re: compiling/debugging question


    Make sure to add the appropriate import statements for the
    referenced shape objects.

    "Ricky" <ricky@stic.net> wrote:
    >
    >I have recently begun studying Java and understand the concept and functationality
    >of compiling the Java file and the creation of the class file. However,
    >in the event that I cannot successfully compile a Java file, I am essentially
    >stuck. I am using JDK 1.2.1 and JBuilder as a debugger. In running the
    >following lines:
    >
    >
    >public void init() {
    > Rectgl r = new Rectgl(10,5,Color.red);
    > Square s = new Square(10,Color.blue);
    > Circle c = new Circle(20,Color.yellow);
    > Square s2 = new Square(40,Color.green);
    > add(r);
    > add(s);
    > add(c);
    > add(s2);
    > add(new PixLabel(r));
    > add(new PixLabel(s));
    > add(new PixLabel(c));
    > add(new PixLabel(s2));
    >
    >I received a debug error in JBuilder stating:
    >
    > "Error (11)class Rectgl not found in class PixApplet"
    >
    >This error occurs for all of the referenced shapes.
    >Looks as if it isn't pointing to some necessary files or something? I don't
    >know, can anyone help?
    >
    >
    >



Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


Top DevX Stories

Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL


Sponsored Links