alexsa
alexsa

Reputation: 25

Running a program in eclipse

Each time I try to run a new program, an old program 'client.java' is run by eclipse. How do I change this setting? How do we tell eclipse which program to run? I tried using the arrow beside run button but it dosen't list out my new program.

Upvotes: 0

Views: 51

Answers (3)

Jorge Nieto
Jorge Nieto

Reputation: 119

Firs of all make sure that your program has a main class.

Then click in the black button next to the run button -> Run As-> JAVA Application.

If this doesn work make sure you have all this properly set up.

Run Configurations

Upvotes: 0

user3821521
user3821521

Reputation:

You can change the default behavior by going to Window > Preferences > Run/Debug > Launching and in the 'Launch Operation' section, select the radio button for Launch the selected resource or active editor and then select Launch the associated project underneath.

enter image description here

Upvotes: 1

Rahman
Rahman

Reputation: 3785

Right Click To the class -> Run As-> JAVA Application

Upvotes: 1

Related Questions