Need to find java version on Unix machines

HI ALl, Please help me with a relevance to find the Java version installed on Unix machines. I did try to use the action script “java -version > /var/opt/javaversion.txt” but somehow the output is not redirected to the file, if it was then i would have read that file through an analysis. But it seems that i would need a relevance to be used in an analysis to produce the version information. Ty

Try this
version of package whose (name of it contains “java”) of rpm

1 Like

Thanks Manish, I did try as Java -version > /tmp/javaversion.txt but it did not give the stdout output so tried java -verison 2> /tmp/javaversion.txt and it worked and i will get it read through analysis now.