JNLP checking OS and loading accordingly

Hi,



I have an app that I have running on both Mac and PC. I have it loading from the web with a jnlp file. Up to now I have had 2 seperate JNLP files one for PC and one for mac (cos they load different nativelibs etc). Is there a way to have a single JNLP and branch depenging on whether it is running on a mac or PC?



Thanks in advance





CH

Have a look in svn-jnlp-directory: jme-nightly.jnlp:


<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+"
    codebase="http://captiveimagination.com/download/jme/nightly/"
    href="jme-nightly.jnlp">

   ...

    <security>
        <all-permissions/>
    </security>

    <resources>
      <!-- Why are jme-audio.jar and jme-swt.jar missing here?
           Is that on purpose or is this list obsolete?  -->
        <jar href="lwjgl.jar"/>
        ...
        <jar href="jme-ui.jar"/>
    </resources>

    <resources os="Windows">
        <j2se version="1.4+"/>
        <nativelib href="lwjgl-windows.jar"/>
        <nativelib href="openal-windows.jar"/>
        <nativelib href="jinput-windows.jar"/>
    </resources>
    <resources os="Mac OS">
        <j2se version="1.4+"/>
        <nativelib href="lwjgl-mac.jar"/>
        <nativelib href="openal-mac.jar"/>
        <nativelib href="jinput-mac.jar"/>
    </resources>
    <resources os="Linux" arch="i386">
        <j2se version="1.4+"/>
        <nativelib href="lwjgl-linux.jar"/>
        <nativelib href="openal-linux.jar"/>
        <nativelib href="jinput-linux.jar"/>
    </resources>

    <component-desc/>
</jnlp>