Thank you for the quick response
Yes I will put future code in code tags.
The issue that I having, there is no console output or print out from the command line when I run the program that I provided.
Yes there is an output when I execute this portion of the code.
but once I add the -version there is no output, not sure why, is locking or what ?
The provided solution by Peter Taucher seems to be working fine, thank you, but I thought it is an overkill for what I'm trying to do and that is writting simple junit to check for the java -verison.
At least now I have a solution that I can use.