Hi to all of you! I'm using Eclipse Luna 4.4.1 for Mac. I have made a project for a Java seminar I am attending.My project consisits of several classes that runned perfectly fine...until today.That is , when I opened one of my classes and made some changes I started getting a "Run as ant build" window. Now, none of my classes is running, not even when I undid all my changes.
Could you please help me as to what the problem is?
Thank you in advance!
This is the code that I wrote. Originally, I had the color and model variables public, without the set methods...

public class Car {
    private String model;
    private String color;
    boolean engineState;

    public void setModel(String m){
        model=m;}
    public void setColor(String c){
        color=c;}

    }

    Car(String m, String c){
        model=m;
        color=c;
        engineState=false;
    }

    void startEngine() {
        if (engineState==true)
            System.out.println("The engine is already on.");
        else
        {engineState=true;
        System.out.println("The engine is now on.");}

    }

    void showAttributes(){
        System.out.println("This car is a "+color+" "+model);
        if (engineState==true)
            System.out.println("The engine is on.");
            else
            {   engineState=false;
                System.out.println("The engine is off.");}
        }


    public static void main (String args[]){
        Car c= new Car("Peugeot 207 Rallye", "metallic black");
        System.out.println("Calling showAttributes...");
        c.showAttributes();
        System.out.println("---------------");
        System.out.println("Starting engine...");
        c.startEngine();
        System.out.println("---------------");
        System.out.println("Calling showAttributes...");
        c.showAttributes();
        System.out.println("---------------");
        System.out.println("Starting engine...");
        c.startEngine();
    }

Perhaps take a look in Here

Ultimately, if you cannot resolve it I think you can create new project copy/paste the code, then right click your class Run as -> java application , should work

Well, I hoped to resolve it without copy/pasting the code, but finally that's what I did...Works fine now, thanks for the reccomendation!

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.