Question

in a java webstart file (jnlp) you can specify the nativelib tag to load binaries. you can also specify toload different ones for different operating systems by also specifying the os attribute.

for example:

<resources os="Linux">
    <nativelib href="....jar"/>
</resources>

<resources os="Windows">
    <nativelib href="....jar"/>
</resources>

<resources os="Mac OS X">
    <nativelib href="....jar"/> 
</resources>

but how can i specify even different binaries for different architectures? for example win32 and win64 or linux 32 and linux 64bit. operating systems. where can i find a list of options for the os-attribute?

Was it helpful?

Solution

To determine that you basically need the os.arch property. Also see http://lopica.sourceforge.net/os.html for a complete list. You can use the arch attribute of the <resources> element for this.

OTHER TIPS

According to http://jcp.org/aboutJava/communityprocess/mrel/jsr056/index3.html:

"os attribute: Specifies the operating system for which the resources element should be considered. If the value is a prefix of the os.name system property, then the resources element can be used. If the attribute is not specified, it matches all operating systems."

So you need to do some investigation of the value of the os.name system property on the platforms you want to deploy to.

Here's an example for Windows:

<resources os="Windows" arch="x86">
    <nativelib href="....jar"/>
</resources>
<resources os="Windows" arch="x86_64">
    <nativelib href="....jar"/>
</resources>
<resources os="Windows" arch="amd64">
    <nativelib href="....jar"/>
</resources>

https://stackoverflow.com/a/1703973/361855 gives a link with that includes architecture values for other platforms.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top