ylun
ylun

Reputation: 2534

How to make eclipse open the console automatically?

How can Eclipse be made to open the console automatically when a program is run? I can't seem to find the preference for it.

Ideally, the result would be similar to the console behaviour in NetBeans, where the console will open up automatically when a program is run.

How can this be achieved?

the settings under console only shows these options:

enter image description here

Edit: Suggestion from Comment The option to open the console seems to be excluded, why?

enter image description here

Upvotes: 4

Views: 6308

Answers (4)

simpleuser
simpleuser

Reputation: 1682

Go to Windows→Run/Debug→Console and select both Show when program writes to standard out and Show when program writes to standard error

Then it will pop open the Console window regardless of whether you are in the Java or Debug perspective.

Upvotes: 1

Aniket Kasar
Aniket Kasar

Reputation: 11

  1. Open eclipse
  2. Open console window
  3. Right click on console window-->Preferences-->Restore defaults-->Apply and close

Upvotes: -1

Aarowaim
Aarowaim

Reputation: 811

Go to Preferences>Run/Debug>Perspectives and select Java Application. Then, go to the right side and change the run perspective to Java, or make your own perspective that includes the console window. Double check that "Open the associated perspective when launching" is set to "Always", or "prompt". I tested the settings below by running while in the debug perspective; it switched to the Java perspective automatically.

enter image description here

The console is a view; a smaller part of any perspective. Because the Java perspective includes the console view, conveniently placed below your code, using the Java perspective and setting it to launch automatically will solve your problem.

Upvotes: 2

Mike Knooihuisen
Mike Knooihuisen

Reputation: 204

Assuming there is something being output to the console, Eclipse will open the Console automatically on running the program. Try a simple test:

public static void main(String[] args) {

    System.out.println("I'm in the console!");
}

Upvotes: 0

Related Questions