Reputation: 55
I wrote some java code in Eclipse. When I run it, I see the output of another project (that I wrote before) in the console. How can I see the output of my new code?
Upvotes: 5
Views: 18080
Reputation: 10707
Trying to guess your problem: When you press the Run as
button (White arrow in green circle), Eclipse doesn't run the program you're editing. Instead, it runs again the last program you executed. That's the reason why you see the output of another project: You're telling Eclipse to repeat its execution.
So, to run your new app, right click over the code and select Run as/Java application.
Upvotes: 4
Reputation: 727
Right click your project in the project explorer. And then this menu will pop up:
Click Run As > Java Application
Upvotes: 1