Is there a way to autodetect Java based on the bitness of the JVM? Our application requires Java 64-bit to be installed, but we have seen several instances where both 32-bit Java and 64-bit Java were installed on the machine, and the installer autodetected the 32-bit JVM over the 64-bit JVM. We are not allowed to show the user a list of available JVMs (we install a 64-bit JVM if one cannot be found by the installer).

asked 14 Jun '12, 14:47

mgross's gravatar image

mgross
6223
accept rate: 0%


InstallBuilder includes a check for specific bitness using the <bitness> in <validVersion>. It was first included in InstallBuilder 8.2.0.

For example:

<autodetectJava>
  <validVersionList>
    <validVersion>
      <vendor>ibm</vendor>
      <minVersion>1.5</minVersion>
      <maxVersion></maxVersion>
      <bitness>64</bitness>
    </validVersion>
  </validVersionList>
</autodetectJava>

The example will select any Java that is at least 1.5 and is 64bit.

You can find more information in Java section of InstallBuilder user guide.

link

answered 14 Jun '12, 14:51

wojciechka's gravatar image

wojciechka ♦♦
7.8k61122
accept rate: 26%

That works perfectly. Thanks!

(14 Jun '12, 15:07) mgross

Please don't add comments as answers

(05 Aug '12, 02:02) Petrucio
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×38
×8
×2

Asked: 14 Jun '12, 14:47

Seen: 2,058 times

Last updated: 16 May '13, 20:58