Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8081041
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 5, 20262026-06-05T16:36:06+00:00 2026-06-05T16:36:06+00:00

hey guys having this really simple problem but cant seem to figure out have

  • 0

hey guys having this really simple problem but cant seem to figure out have to import this package called it but i have no idea where to put the actual folder on the mac, keeps on giving an error package does not exist, this is a really stupid question, but really have no idea what to do

here is the code (java) :

import it.*;
import java.awt.*;

public class pyramidColour
{           
  public static void main (String[] args)
  {
     int col1 = (int)(Math.random()*255+1);
     int col2 = (int)(Math.random()*255+1);
     int col3 = (int)(Math.random()*255+1);

     Color newCol = new Color (col1, col2, col3);

     Gogga bug= new Gogga();//creating the gogga
     Gogga(1,8);

     for (int i = 1; i <= 4; i ++)//loop for going up 
     {
        bug.move();
        bug.turnRight();
        bug.move();
        bug.turnLeft();
     }

     bug.setDirection(bug.DOWN);

     for (int i = 1; i <= 3; i ++)//loop for going down
     {         
        bug.move();
        bug.turnLeft();
        bug.move();
        bug.turnRight();         
     }

     bug.move();
     bug.turnRight();

     for (int i = 1; i <= 7; i ++)//loop for base of pyramid
     {
        bug.move();
     }         
  }
}

The next part of the project is putting the loops into a method, any help would be greatly appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-05T16:36:08+00:00Added an answer on June 5, 2026 at 4:36 pm

    You have to include the classpath of the package in the java command :

    java -cp .;<path to the it classes> pyramidColour
    

    . before ; stand for current directory, where pyramidColour class is stored.

    Edit : on Mac the delimiter is not ; but : (thanks Jesper)

    If you are using an IDE (Eclipse, Netbeans) you can simply add the library in the project properties.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey guys. I'm having this problem for 2 days now and I really don't
Hey guys im having a problem trying to program out a set of logic.
Hey guys I'm trying to work my way through this but am having an
Hey guys, i'm having a problem with this little script. When i hover over
Hey guys, I'm new to jQuery/js and having a hard time figuring this out.
hey guys hope you can help me out, I am having a weird problem.
Hey guys am having a bit of problems with my jQuery, I have all
Hey guys I'm having such a hard time of it today. I have a
Hey guys (and gals) I'm having a problem using Assembly GetExportedTypes() in .NET 4.0.
Hey guys, I'm having a problem with IE7, my menu always drops down behind

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.