Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

like image 745
clamp Avatar asked Nov 09 '09 20:11

clamp


2 Answers

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.

like image 65
BalusC Avatar answered Oct 16 '22 20:10

BalusC


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.

like image 3
Thorbjørn Ravn Andersen Avatar answered Oct 16 '22 18:10

Thorbjørn Ravn Andersen