user1204570
user1204570

Reputation: 219

Why isn't Eclipse running my Hello World Program?

I have a simple program and when I right click on file>Run as Java Application nothing happens. Here is the program but there are no errors really.

public class test1{
    public static void main(String arg[]){
        System.out.println("Testing Testing!");

    }
}

Upvotes: 1

Views: 6408

Answers (4)

Sam
Sam

Reputation: 1

If you are expecting to see a window then you would be wrong. when you type System.out.println("Testing Testing!"); it will put Testing Tesing! in the eclipse console you can know this because of the System part of your code.

Upvotes: 0

Peter Kovacs
Peter Kovacs

Reputation: 11

Mostly likely you don't have your app selected in the package explorer tree at the left.

Just click on the top-most item in the tree (ie. "MyFirstApp") and then try running again. Chances are you had "activity_main.xml" selected as it's the default selection when you built your test app.

Upvotes: 1

kosa
kosa

Reputation: 66637

Are you checking output window? open Menu--->Window--->Show View-->Console and check

Upvotes: 2

RMorrisey
RMorrisey

Reputation: 7739

Check the Eclipse console view to see if your output is shown there. If not, check your Problems view for errors.

Upvotes: 1

Related Questions