Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Eclipse Console showing previous output

 
Tom McCann
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm new to Eclipse. After installing Eclipse I created a simple Java project with a HelloWorld program (just to test it out).

Now when I run any other program, the program output displays ok in the console pane but then is immediately overwritten by my old HelloWorld program running. I can't seem to persuade my HelloWorld program to disappear. I have tried using the drop-down run menu and selecting my new (current) program specifically, but the old HelloWorld still runs afterwards. I've also clicked the 'Remove All terminated launches' button above the console pane.

Any ideas ? It's probably something obvious but it's driving me nuts.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34195
340
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I'm not sure why it would be running afterwards, but I suggest cleaning out that run configuration entirely.

Go to "Run ...". On the left, there is a list of all of the applications you have run. Try deleting the HelloWorld one in case it is getting remembered here.
 
Tom McCann
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks for your reply.

I can see a Run menu. I can also see the Run button (which does have a list of previously run programs underneath it in a menu) but I cannot see anything 'on the left' or any way to clear out the list.

Could I trouble you to be a little more specific as to how to clear out the list. Thanks again.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Does the console window for your Hello World program show a "<terminated>" before the main class name? Is the red "Terminate" button enabled?
 
Tim Holloway
Saloon Keeper
Pie
Posts: 18098
50
Android Eclipse IDE Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The console will display the console for the currently-selected debug session (whether it's running or not). So it's a matter of clicking on the appropriate app in the Debug pane.

To clear a console, right-mouse click on the console window and select clear OR click on the clear icon up in the upper-right corner of the window. Clearing that app's console will NOT cause some other app's console to display, however. You still have to select the app whose console you want to view by clicking in the Debug pane.
 
Tom McCann
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
OK - I've noticed a pattern to this. If I make a change to the code in the edit view and press the run button (or the debug button), it prompts me to save the file (I always click OK). It then runs the current program in the console - it then immediately overwrites the console window with the results of the previously run program (originally this would have been my HelloWorld program, but now that I have written more programs, it is always the previously run program).

e.g. I run John.java which prints "Hello - I am John"

I then create a new program - "Bill.java". On clicking run, it prompts me to save Bill.java (OK) then it runs and prints "Hello - I am Bill". This text then immediately disappears when John.java runs again and prints "Hello - I am John"

Note that this only happens if I made changes in the edit view and have been prompted to save. Otherwise it works as expected. Pressing the Red terminate button does not seem to affect anything.

By the way, I'm running Version: 3.1.2 - Build id: M20060118-1600 on a Thinkpad running XP pro.

I can live with this problem but its very irritating - just wonder if anyone else has seen it or got around it.
 
Ilja Preuss
author
Sheriff
Posts: 14112
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Never seen it, but also never used 3.1.2. I'm currently using 3.2M5.
 
Tom McCann
Ranch Hand
Posts: 31
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Doesn't matter - I've gone back to using Textpad for small stuff and JBuilder for large projects. At least JBuilder knows what program to run.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic