How to check Java version remotely
21,830
Solution 1
You can go to \computer-name\c$\Program Files\Java\jre6\bin.
Find the java.exe and right click on it. Then go to the "Version" tab.
You can also view the Deployment.properties file in:
\\computer-name\c$\Documents and Settings\USER\Application Data\Sun\Java\Deployment\deployment.properties
Solution 2
How about:
"\\server\c$\Program Files\Java\jre6\bin\java.exe" -version
You may have to adjust the path ("Program Files (x86)" for example).
Solution 3
If you know the path to the EXE, you can use PowerShell:
$EXE = ls "\\server\E$\Bin\Java\Current\bin\java.exe" ; $exe.versioninfo
If you want to find the Java.exe location on a remote machine, you can query the %JAVA_HOME%
variable remotely using PowerShell:
gwmi win32_environment -computername COMPUTER1 |? {($_.name -eq "JAVA_HOME") -and ( $_.username -eq "<SYSTEM>")}
Java.exe file location will be in the subfolder bin
in the VariableValue path:
Related videos on Youtube
Author by
r0ca
Updated on September 17, 2022Comments
-
r0ca over 1 year
How can I check the Java version installed on a remote computer that I can't remote on?
It's being used by someone so I can only check by
\\computer-name\c$\...
-
r0ca almost 14 yearsBoth answers are good. I will take this one even if I figured it out myself... by another way. I downloaded Pstools and then: psexec \\computer-name cmd.exe and then, java -version
-
r0ca almost 14 yearsBut definitly, this question deserves some upvotes! hahaha
-
Qflov Qflov almost 14 yearsDidn't even think to recommend psexec because there are other ways to do it. But psexec is an awesome utility to use for a large variety of things.
-
KERR over 6 yearsThis only works if Java is installed in the default directory. You might be better off remotely querying the environment variable first to find java.exe (see my PowerShell answer below).
-
Jörg about 5 yearsthe nice thing about this powershell approach is, compared to the other answers here, that you can execute locally (ps instead of java remotely) and that you don't need UI - thumbs up @KERR