How do I detect whether 32-bit Java is installed on x64 Windows, only looking at the filesystem and registry?

前端 未结 6 1695
执念已碎
执念已碎 2020-12-15 04:58

I need to determine whether a particular system has 32-bit Java installed. I\'m doing a remote query that only gives me access to the filesystem and registry, so I cannot a

相关标签:
6条回答
  • 2020-12-15 05:20

    Check this key for 32 bits and 64 bits Windows machines.

     HKEY_LOCAL_MACHINE\SOFTWARE\JavaSoft\Java Runtime Environment
    

    and this for Windows 64 bits with 32 Bits JRE.

     HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\JavaSoft\Java Runtime Environment
    

    This will work for the oracle-sun JRE.

    0 讨论(0)
  • 2020-12-15 05:20

    If it is not Oracle's Java, you may not be able to tell. When I install Oracle Java 64-bit, the files go into C:\Program Files\Java, but when I install a 32-bit version, they default to C:\Program Files (x86)\Java instead. Of course, the person who installed Java could have overridden those defaults.

    0 讨论(0)
  • 2020-12-15 05:29

    just write "java -d64 -version" or d32 and if you have It installed it will give a response with current version installed

    0 讨论(0)
  • 2020-12-15 05:32

    I tried both the 32-bit and 64-bit installers of both Oracle and IBM Java on Windows, and the presence of C:\Windows\SysWOW64\java.exe seems to be a reliable way to determine that 32-bit Java is available. I haven't tested older versions of these installers, but this at least looks like it should be a reliable way to test, for the most recent versions of Java.

    0 讨论(0)
  • 2020-12-15 05:42

    This seems to provide the info on Windows:

    1.) Open a windows command prompt.

    2.) Key in: java -XshowSettings:all and hit ENTER.

    3.) A lot of information will be displayed on the command window. Scroll up until you find the string: sun.arch.data.model.

    4.) If it says sun.arch.data.model = 32, your VM is 32 bit. If it says sun.arch.data.model = 64, your VM is 64 bit.

    0 讨论(0)
  • 2020-12-15 05:45

    Do you have access to the command prompt ?

    Method 1 : Command Prompt

    The specifics of the Java installed on the system can be determined by executing the following command java -version

    Method 2 : Folder Structure

    In case you do not have access to command prompt then determining the folder where Java.

    32 Bit : C:\Program Files (x86)\Java\jdk1.6.0_30

    64 Bit : C:\Program Files\Java\jdk1.6.0_25

    However during the installation it is possible that the user might change the installation folder.

    Method 3 : Registry

    You can also see the version installed in registry editor.

    1. Go to registry editor

    2. Edit -> Find

    3. Search for Java. You will get the registry entries for Java.

    4. In the entry with name : DisplayName & DisplayVersion, the installed java version is displayed

    0 讨论(0)
提交回复
热议问题