Search code examples
javajava-web-startjnlp

Webstart: What os and arch does my system return?


The JNLP specification allows for tag elements to be specified per the system's OS and architecutre.

How do I find out what Java Webstart thinks is my computer's OS and architecture? Is there a way to programmatically view or extract this value somehow? Thanks.


Solution

  • You can use System.getProperty("os.name")

    for the OS and

    System.getProperty("os.arch")

    for the architecture, although this will need to be in the web start app itself.