12

Pretty straight forward. I've been working in Eclipse Juno for a while now and my console always worked. When you output to the console with

System.out.println("Something");

In java, or just when you compile and build your project there's always some output in the console. But today, I started up the IDE, and nothing. No console output. I've restarted Eclipse, reset the perspective.. Nothing is happening.

Using the Java EE version just btw. Any help would be appreciated. Thanks!

SOLVED: So after struggling for how long, I shut down my server. Killed eclipse. And restarted everything and the console is now working again. No idea how this happened in the first place.

Sambhav Sharma
  • 5,741
  • 9
  • 53
  • 95

12 Answers12

11

There is a small pull-down icon on the right of the console that lets you select which console you want to see. Maybe you accidentally selected a different console.

Jason Sperske
  • 29,816
  • 8
  • 73
  • 124
  • Why would you look at that... Which one is the one I should be viewing? There's 'Java Stack Trace', 'Host OSGi', 'CVS', and 'Ivy console'... Went through all of them and they're all blank. –  Aug 29 '13 at 07:23
  • This person claimed to fix a similar issue by running Eclipse as administrator: http://stackoverflow.com/questions/14984691/no-output-in-console?rq=1 while I have accidentally switched consoles (while doing Python development) I have never had this issue, though I do run Eclipse as administrator (but for different reasons). – Jason Sperske Aug 29 '13 at 07:27
  • Okay so running it as administrator doesn't do anything either. I'm going to try and delete and re-add my server and see if that does anything.. –  Aug 29 '13 at 07:41
  • OMG I'm dumb I copied a package and everytime run the old main class *Facepalm* – Squareoot Nov 02 '17 at 17:25
  • 1
    Saved my day: The C++ build system switched from the `make` to the - mostly empty - `configure` console. So this really happens though not by accidental user interaction. – Holger Böhnke Sep 17 '18 at 13:46
8

Go to run as and choose Run Configurations -> Common and in the Standard Input and Output configuration see if Allocate Console is selected.

Run Configurations: enter image description here

Commons view: enter image description here

Narendra Pathai
  • 41,187
  • 18
  • 82
  • 120
2

for this same i did the following things and it's worked for me

Here's what i did:

[1] Uninstall - Removed all traces of Eclipse (64-bit). - Removed all traces of MinGW (and/or Cygwin). - Removed all traces of Java (SDK and JRE).

[2] Restart PC

[3] Install - Installed latest Java JDK (includes the JRE) 32-bit. - Installed Eclipse IDE (Java Edition) 32-bit. - Installed MinGW (with Msys). - Installed the necessary CDT tools from within Eclipse.

And it works fine!

For installation compiler/CDT installation, i followed this guide (making my own alterations where needed): http://max.berger.name/howto/cdt/cdt.jsp

Hope it works for you! And thanks for the tip-off that it was working 100% on a 32-bit machine. Very Happy

kondapaka
  • 132
  • 1
  • 10
  • 1
    lol I agree. But I'll keep this in mind when all else fails. Thanks @kondapaka –  Aug 29 '13 at 07:21
  • 1
    you can also format and reinstall the operating system, then install Java and Eclipse and see if it works – golimar Nov 21 '18 at 17:26
2

You can just re-open the console view from Window>Show View> Console. It worked for me, just before posting the answer here.

raja777m
  • 401
  • 1
  • 8
  • 18
2

Go to run as and choose Run Configurations -> Common and in the Standard Input and Output configuration see if Allocate Console is selected.

Mark file option as ticked and browse to your current workspace. This will work for you

Jabongg
  • 2,099
  • 2
  • 15
  • 32
1

How to System.out to console: Right click on your glassfish (Server Tab) and go to View Log File

enter image description here

Make sure the console setting is directed at your server.log file:

enter image description here

Gene
  • 10,819
  • 1
  • 66
  • 58
1

For me, using eclipse-luna the problem was related to a specific workspace. Whenever I used this workspace, one specific plugin failed to do console-output. I re-installed the plugin, I even re.installed eclipse itself and whiped out the ".eclipse-luna" folder, but the problem still was there.

I finally fixed the problem by deleting the folder ".metadata" in this workspace.

Alex
  • 1,602
  • 20
  • 33
0

I also had no output in the console after some error. The answer from Narendra Pathai worked for me.

  1. Deselect the Allocate Console

  2. Run the application => I got output in my console directly

  3. Select it again

After doing that, I got output.

Nic
  • 6,211
  • 10
  • 46
  • 69
Azertiy
  • 123
  • 1
  • 6
0

First Go TO (Window->Show view->Console)

Then select "Show Console when started out changes" icon in the right end of the console window.

hotzst
  • 7,238
  • 9
  • 41
  • 64
0

Solved it by cleaning the .metadata

vaibs222
  • 21
  • 2
0
Possibly one of this should solve
1] Restart Eclipse or PC
2] Clear Metadata 
3] Make Sure of the Server log
4] Sometimes Make Sure from personal experience 

SAVE THE FILES BEFORE RUNNING

Isaac
  • 99
  • 2
  • 5
-3

Go to Window->Show View -> Console

Crickcoder
  • 2,135
  • 4
  • 22
  • 36
  • 1
    I can see the console just fine, I can't see output on it through –  Aug 29 '13 at 07:24