|
From: David F. <dav...@zi...> - 2006-06-07 17:25:56
|
I think I found the answer to my question regarding detection of 64bit JVM. If anyone has a better solution, do tell. Seems Sun has a Java System property to determine the bitness of the JVM: 32 or 64: sun.arch.data.model=32 // 32 bit JVM sun.arch.data.model=64 // 64 bit JVM As with any proprietary System property, it may only work on Sun's JVM (ie: not IBM's). It may disappear in the future... Regards, David On Jun 7, 2006, at 12:15 PM, David Ferrero wrote: > Thanks Leif, but I think I wasn't clear enough in my first post. > > I am trying to build one installer that takes care of all java > supported OS / JVM possibilities. I have reviewed the testwrapper > shell script in the JWS bin directory. As I understand it, it works > as follows: > > By default it will use the 32 bit version of the wrapper binary. If > it can't find that, it will test for the 64 bit version (or in the > case of Mac OS X, the universal binary) and run that instead. If it > can't find either, it will display an error message. > > Please correct me if I'm wrong, but it would appear that it is my > software installer's responsibility to detect if the user is > installing on a 64-bit JVM. If both the 32 bit and 64 bit wrapper > binaries were present, that it would attempt to use the 32 bit > wrapper binary first and it would fail on a 64 bit JVM environment. > > Is there any way to detect if they are using a 64-bit JVM? I would > like to avoid having to display an error and requiring the user to > delete the 32-bit wrapper binary manually before restarting. Is > the best we can do to document the 64-bit JVM situation? > > Thanks for any clarity anyone can share about detecting 64-bit JVM > or the inner workings of JWS that I may be mistaken about. > > > >> From: Leif Mortenson <leif@ta...> >> >> <msg.gif> >> Re: getting hardware arch using just java >> 2006-06-07 00:54 >> David, >> The files in the delta pack can be deleted as you wish, or even >> added if you have >> compiled the wrapper for other platforms. In general, the >> wrapper-xx-xx-64 files >> are not really needed as the 32 bit versions work fine on the 64 bit >> platforms. >> The libwrapper-xx-xx-64.so files are required if a 64 bit JVM is >> being >> used. The >> 32.so files are used by 32 bit JVMs regardless of whether the >> hardware >> is 32 or >> 64 bits. >> >> Cheers, >> Leif >> >> David Ferrero wrote: >> > If I want the wrapper scripts to detect the proper architecture >> > native libs to use, and I want to minimize the installation >> size of >> > my software, can I have my installer script install just the OS >> bits >> > for a given OS instead of the whole delta-pack? >> > >> > ie: >> > >> > For os.name="Linux", could I have my Installer just copy the Linux >> > scripts plus the following files? >> > lib/wrapper.jar >> > lib/libwrapper-linux-ppc-64.so >> > lib/libwrapper-linux-x86-32.so >> > lib/libwrapper-linux-x86-64.so >> > >> > Thanks for clarifying, >> > >> > David >> > > > |