jnlp webstart nativelib: how to specify different architecture for os
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 b开发者_如何学Cinaries 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?
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.
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.
精彩评论