2

I want to know the bit version of the JVM installed on the user machine and based on that i want to install different versions of my application using Java WebStart. I am thinking that this information can be extracted from the java plugin installed on the browser.

I do not want the OS or CPU bit version, since 32 bit JVM can be installed on 64 bit machine.

Can this be done using javascript?

Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
Sumit Jain
  • 1,484
  • 2
  • 25
  • 44

1 Answers1

2

Can this be done using javascript?

No. Not without help from Java (or other more complicated means).

But then, JWS can deploy code (and natives etc.) according to details listed in the launch file, per OS & architecture.

See the JNLP File Syntax & particularly the resources Element section, for details. Summary from the table:

  • resources - Describes all the resources that are needed for an application.
    • os Specifies the operating system for which the resources element should be considered.
    • arch Specifies the architecture for which the resources element should be considered.
Andrew Thompson
  • 168,117
  • 40
  • 217
  • 433
  • can it be customized on the bit version of JVM? I don't want OS architecture. – Sumit Jain May 25 '12 at 12:51
  • just out of curiosity can you elaborate on other more complicated means – Sumit Jain May 29 '12 at 09:07
  • Not really. I was thinking vaguely of using some ActiveX object to (for example) query IE directly for the Java details. Never done it though, and given an applet is a much more straightforward way to get the info. & `deployJava.js` is available for most version based requirements, could not be bothered trying. – Andrew Thompson May 30 '12 at 02:27
  • yes i tried deployJava.js...too bad it gives only the versions – Sumit Jain May 30 '12 at 06:09