java -version doesn't write to stdout?
Posted
by Zárate
on Super User
See other posts from Super User
or by Zárate
Published on 2010-05-20T09:25:24Z
Indexed on
2010/05/20
9:32 UTC
Read the original article
Hit count: 285
Hi there,
Either I'm doing something silly or Sun is. How come something like:
java -version > version.txt
Still prints out to stdout and leaves version.txt empty? I'm checking out the exit code, and it's still 0, so is not that's writing to stderr.
I need this because I'm building a test-environment tool and want to check if the version of Java is adequate, I was planning to catch that version output, but now I'm stuck.
I'm on OS X Leopard, Java version 1.6.0_20.
Any ideas?
Cheers,
Juan
© Super User or respective owner