0

I am trying to run a simple Hello World program on Eclipse IDE - Version: 2020-03 (4.15.0) Build id: 20200313-1211 and it gives a Terminated message on console followed by the desired output. I am using java 11.0.7 2020-04-14 LTS on Ubuntu 20.04 LTS.

Code:

package miscellaneous;

public class Test {
    public static void main(String[] args) {
        System.out.println("Hello World!"); 
    }
}

Output:

<Terminated> Test[Java Application] /usr/lib/jvm/jdk-11.0.7/bin/java
Hello World!

How do I not display the terminated message on the console?

I have already gone through this post:

Console shows terminated message in eclipse

Sandeep Chatterjee
  • 3,220
  • 9
  • 31
  • 47
  • 1
    This `` message is not displayed _on the console_ (as in `stdout`) but on the info bar of the _Console view_. (Aren't there different colors for each in your Eclipse?) If you happen to have a longer running program you see there what's running, without the `` (try `Scanner(System.in).next();`, for instance, and enter some text on the console to continue). Did the accepted answer to the question you linked not help you? – Gerold Broser Jun 13 '20 at 23:54

1 Answers1

4

The terminated message is not part of your program's output. It is simply a status message from Eclipse telling you that the program has finished running. It is displayed in the view information area rather that the console output area.

You can't stop Eclipse displaying this message.

greg-449
  • 109,219
  • 232
  • 102
  • 145