views:

331

answers:

2

hello, 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?

+2  A: 

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.

Thorbjørn Ravn Andersen
thanks that makes sense. actually i would suspect that someone in the depths of the internet would have done that investigation and assembled a list of the most common os/architectures
clamp
+3  A: 

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.

BalusC