This week's book giveaway is in the OCAJP 8 forum. We're giving away four copies of OCA Java SE 8 Programmer I Study Guide and have Edward Finegan & Robert Liguori on-line! See this thread for details.
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.
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.
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
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.
An IDE is no substitute for an Intelligent Developer.
Joined: Aug 27, 2005
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.
Joined: Jul 11, 2001
Never seen it, but also never used 3.1.2. I'm currently using 3.2M5.
Joined: Aug 27, 2005
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.