3

How Can I check 32bit or 64bit in Install4j API (custom code)??

Heesuk Kim
  • 77
  • 4

1 Answers1

3

To check whether the installer is running on a 32-bit or 64-bit Windows, use

Util.is64BitWindows()

in the install4j API. This works regardless of whether it's called in a 32-bit or a 64-bit installer. To check whether the current JVM is a 32-bit or 64-bit JVM, see here

Community
  • 1
  • 1
Ingo Kegel
  • 46,523
  • 10
  • 71
  • 102
  • thank you. Util.is64BitWindows() can check jsut 32-bit JVM or 64-bit JVM. It depends on JVM. I want to check real OS Architecture. Though my OS Architecture is 64bit machane, it shows 32-bit on 32-bit JVM. – Heesuk Kim Aug 16 '12 at 08:00
  • 1
    @HeesukKim No, `Util.is64BitWindows()` checks the OS architecture, not the JVM. Do you really get `false` on a 64-bit Windows? – Ingo Kegel Aug 16 '12 at 12:27