Eclipse Console not showing output
Asked Answered
S

14

16

I have written a simple class having an SOP statement for "Hello World". But the Eclipse console is not showing output. I then wrote the same program in a previously created project and it worked fine. I am opening the Console as given below:

Window->Show View->Console.

But it is not working. I am using j2ee project in the same workspace. Any idea? Please help. I am stuck because of this problem.

Sinker answered 24/12, 2014 at 6:13 Comment(5)
share screenshot of your problem that you are facing. How some can know what issue you having if they don't see it.Baeza
Check that the right main is executed. And that there is no redirection (System.setOut...)).Wardship
@ShaU Not yet.I am trying to resolve it.Sinker
you share screenshot? or any more details.Tollgate
Closing the Console tab and reopening it with Window->Show View->Console might also help.Bidet
Y
28

Go to "Window > Reset Perspective", that will reset the window settings to default. Next, you might need to stop any running Java processes. I suggest you then click "Remove all Terminated Launches" and if the red "Terminate All" is still available click that as well

Remove all Terminated Launches

Yarmouth answered 24/12, 2014 at 6:24 Comment(3)
I reset perspective and open console.it shows me console with red button on.i also click on terminate all button.still i will not work.Sinker
Hey one more thing i am using j2ee project in workspace.so is it causing some problem??Sinker
Make sure that you're running Demo1. Also, please edit your question instead of adding comments.Yarmouth
S
4

[working] I encountered the same problem, I tried with all the solutions provided above but it didn't work then I came to a solution which worked. Follow the following process to overcome the problem.

Right click on workspace provided by Eclipse --> Select "Run As" --> Java Application.

enter image description here

This will work definitely.

Sarcoid answered 6/9, 2018 at 9:52 Comment(0)
T
4

I've lost the console only in the Java default perspective and I wasn't able to show it again by using window > show view > console.

What I did is the following :

  1. window > Perspective > reset perspective
  2. window > show view > console

and It appears now!!

Terrorize answered 5/12, 2020 at 15:46 Comment(0)
B
2

Make sure that the project structure should be as follows:

enter image description here

Bindweed answered 24/12, 2014 at 6:20 Comment(0)
M
2

Make sure that your System.out.println("Hello World") is in main method with proper signature.

Ex:

public static void main(String[] args){
System.out.println("Hello World");
}
Machination answered 24/12, 2014 at 6:55 Comment(0)
S
1

None of the above. What helped in my case:

Run > Run configurations > Common > uncheck Launch in background (last tab all the way at the bottom).

Then it showed the error why the thing wouldnt start.

In my case: a project dependency to a project which I had closed.

See (rightclick) Project > Build path > Configure build path.

Schema answered 5/10, 2018 at 7:26 Comment(0)
S
1

Click on Helps on the top bar. then click on Check for Updates. And update whatever updates are generated for your IDE. Helps> Check for Updates > ....

Hope it will fix your problem.

Swords answered 25/3, 2019 at 20:30 Comment(0)
L
1

Double-check you actually saved your file. Many of us forget to save the file and simply hit run.

Lava answered 8/5, 2020 at 9:1 Comment(1)
Cant belevie this was the problem! LOL Worked for me.Corneliacornelian
K
1

Go Run > Run Configurations > Double Click Java Application > Main > Enter path to your main > Done!

Kirbykirch answered 14/7, 2020 at 19:58 Comment(1)
Welcome to SO! This is a new answer to an old question, please explain why your answer is different from the previous.Distilled
T
1

Sometimes it is possible that number of character console can accomodate is beyond capacity, so increase the buffer size of console. windows>prefences>console -increase buffer size

Theola answered 8/6, 2022 at 9:26 Comment(0)
T
0

I had the same problem just figured out the solution. Just check your main method it would be

public void main(String[] args){ 

just change it to this:

public static void main(String[] args){
Tumular answered 13/6, 2016 at 11:41 Comment(0)
P
0

I had the same problem using jre7. Changed to jdk 1.7 and Eclipse console started showing outputs again.

Parotitis answered 29/8, 2016 at 8:21 Comment(0)
P
0
  1. Just right click on console window and click Terminate /Disconnect all.
  2. Run the class again
  3. Done !!!
Preconception answered 8/7, 2018 at 17:54 Comment(0)
T
-1

If eclipse is not showing path,

Please click on RUN-> Run configuration->click on environment tab->click on New-> add a path variable as mingw_path(if compiler is mingw in case of c++ ) and set value as C:\MinGw\bin (please check ur mingw bin path then only set).

Toscano answered 23/7, 2020 at 8:24 Comment(1)
This question is not asking about how to add PATH. For future contributions, please try to ask for clarifications through comments, if the original question is not clear enough.Andre

© 2022 - 2024 — McMap. All rights reserved.