How to check Java version remotely

5

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

Posted 2010-07-23T15:09:08.007

Reputation: 5 474

Answers

7

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.

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

steve.lippert

Posted 2010-07-23T15:09:08.007

Reputation: 1 970

1Both 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 – 2010-07-23T15:42:36.010

But definitly, this question deserves some upvotes! hahaha – r0ca – 2010-07-23T15:44:38.050

1Didn'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. – steve.lippert – 2010-07-23T15:48:35.153

This 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). – KERR – 2017-10-09T05:08:09.487

3

How about:

"\\server\c$\Program Files\Java\jre6\bin\java.exe" -version

You may have to adjust the path ("Program Files (x86)" for example).

coneslayer

Posted 2010-07-23T15:09:08.007

Reputation: 7 494

2

If you know the path to the EXE, you can use PowerShell:

$EXE = ls "\\server\E$\Bin\Java\Current\bin\java.exe" ; $exe.versioninfo

enter image description here

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: enter image description here

KERR

Posted 2010-07-23T15:09:08.007

Reputation: 329

the 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 – Jörg – 2019-04-18T07:58:58.260