aspose file tools*
The moose likes IDEs, Version Control and other tools and the fly likes Eclipse Console showing previous output Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "Eclipse Console showing previous output" Watch "Eclipse Console showing previous output" New topic
Author

Eclipse Console showing previous output

Tom McCann
Ranch Hand

Joined: Aug 27, 2005
Posts: 31
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

Joined: May 26, 2003
Posts: 30957
    
158

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.


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
Tom McCann
Ranch Hand

Joined: Aug 27, 2005
Posts: 31
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

Joined: Jul 11, 2001
Posts: 14112
Does the console window for your Hello World program show a "<terminated>" before the main class name? Is the red "Terminate" button enabled?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16250
    
  21

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.


Customer surveys are for companies who didn't pay proper attention to begin with.
Tom McCann
Ranch Hand

Joined: Aug 27, 2005
Posts: 31
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

Joined: Jul 11, 2001
Posts: 14112
Never seen it, but also never used 3.1.2. I'm currently using 3.2M5.
Tom McCann
Ranch Hand

Joined: Aug 27, 2005
Posts: 31
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.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Eclipse Console showing previous output