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.

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

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

Share:
21,830

Related videos on Youtube

r0ca
Author by

r0ca

Updated on September 17, 2022

Comments

  • r0ca
    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
    r0ca almost 14 years
    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
    r0ca almost 14 years
    But definitly, this question deserves some upvotes! hahaha
  • Qflov Qflov
    Qflov Qflov almost 14 years
    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.
  • KERR
    KERR over 6 years
    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).
  • Jörg
    Jörg about 5 years
    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