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$\...

3 Answers 3

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
4
  • 1
    Both 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
    Jul 23, 2010 at 15:42
  • But definitly, this question deserves some upvotes! hahaha
    – r0ca
    Jul 23, 2010 at 15:44
  • 1
    Didn'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. Jul 23, 2010 at 15:48
  • 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
    Oct 9, 2017 at 5:08
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).

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

1
  • 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
    Apr 18, 2019 at 7:58

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .