Welcome to the Java Programming Forums


The professional, friendly Java community. 21,500 members and growing!


The Java Programming Forums are a community of Java programmers from all around the World. Our members have a wide range of skills and they all have one thing in common: A passion to learn and code Java. We invite beginner Java programmers right through to Java professionals to post here and share your knowledge. Become a part of the community, help others, expand your knowledge of Java and enjoy talking with like minded people. Registration is quick and best of all free. We look forward to meeting you.


>> REGISTER NOW TO START POSTING


Members have full access to the forums. Advertisements are removed for registered users.

Results 1 to 2 of 2

Thread: bicyclejava.BicycleJava class wasn't found in Bicycle.java project

  1. #1
    Junior Member
    Join Date
    May 2013
    Posts
    3
    Thanks
    0
    Thanked 3 Times in 1 Post

    Question bicyclejava.BicycleJava class wasn't found in Bicycle.java project

    First off thank you to all that make this forum possible. I hope that I am in the right area. If I am not please forgive I will try to figure it out as time goes on.

     
    class Bicycle {
     
        int cadence = 0;
        int speed = 0;
        int gear = 1;
     
        void changeCadence(int newValue) {
             cadence = newValue;
        }
     
        void changeGear(int newValue) {
             gear = newValue;
        }
     
        void speedUp(int increment) {
             speed = speed + increment;   
        }
     
        void applyBrakes(int decrement) {
             speed = speed - decrement;
        }
     
        void printStates() {
             System.out.println("cadence:" +
                 cadence + " speed:" + 
                 speed + " gear:" + gear);
        }
    }
    When I try to run I receive the sentence in the title. bicyclejava.BicycleJava class wasn't found in Bicycle.java project. I am using NetBeans IDE 7.3. Any help with this would really be appreciated and Happy Mother's Day to all.


  2. #2
    Super Moderator pbrockway2's Avatar
    Join Date
    Jan 2012
    Posts
    987
    Thanks
    6
    Thanked 206 Times in 182 Posts

    Default Re: bicyclejava.BicycleJava class wasn't found in Bicycle.java project

    Hi Onemoonrising, welcome to the forums!

    That class is not actually "runnable": for that there has to be a main() method. Moreover the class you posted is Bicycle whereas the compiler message talks about a bicyclejava.BicycleJava class. Are there any other classes involved in this project? On the left hand side of NetBeans there is a list which tells you which packages are in your project, and which classes are in those packages. It might help if you described the contents of that "Projects" panel.

Similar Threads

  1. Please I need a help with my first java class project
    By kaboooot in forum Algorithms & Recursion
    Replies: 5
    Last Post: August 9th, 2013, 08:19 AM
  2. File not found in class path
    By Jeff.Steinkamp in forum File I/O & Other I/O Streams
    Replies: 7
    Last Post: January 1st, 2013, 08:37 PM
  3. Getting Class name from Method Name in a Java Project
    By Parikshit Chakraborty in forum Java SE APIs
    Replies: 4
    Last Post: July 26th, 2012, 08:54 PM
  4. class not found
    By aki in forum Java Applets
    Replies: 1
    Last Post: May 23rd, 2012, 06:50 AM
  5. Main Class Not Found Problem
    By shadow in forum Java Theory & Questions
    Replies: 3
    Last Post: September 29th, 2009, 09:42 AM

Tags for this Thread