Can I talk to Java in console printing under Mountain Lion?

I use the good old System.out.println approach to debug my Java application. Before I switched to Mac OS 10.8, it worked just fine. Now, however, my console did not display anything. Apparently, I'm not the first to come across this behavior - see http://www.mac-forums.com/forums/os-x-operating-system/280577-system-out-println-not-showing- console.html .

Do any of you know the way?

+7
source share
2 answers

System.console() returns null for me with mountain lion and java 6.

We needed to change our log in our application to use log4j for output to stdout (which was used to go to system.log before 10.8) and create our own log files in ~/Library/Logs , which can be seen in console.app in any version.

It doesn't seem like a sandbox issue, as I don't see any errors in the sandbox. Try more research to find out which device is being transmitted by jvm according to 10.8. Perhaps it can be sent /dev/null to register by mistake?

+2
source

It works?

 System.console().printf("Hello World!"); 
0
source

All Articles