How can I determine if the installed ColdFusion server is 32 or 64 bit?
I would love to see an answer that solves my problem both from being logged in on the server and programmatically from CFML code.
Ok, not quite as straight-forward as I thought, but the information is there.
In all three CFML engines, you can programmatically access the JVM information via the server scope with Server.Os.Arch
. This contains a value such as amd64
for 64-bit, and i386
or x86
for 32-bit systems.
On Railo (but not ACF/OBD) there is also Server.Os.ArchModel
which simply contains 64
or 32
as appropriate.
For all three engines you can get this 64/32 value with: createObject('java','java.lang.System').getProperty("sun.arch.data.model")
In CF administrator, if you go to "Server Settings" > "Settings Summary" you can find the "Java VM Name" which contains Java HotSpot(TM) 64-Bit Server VM
(or equiv for 32 bit).
In OpenBD administrator, select "Server" > "System Info" and the third option contains "Operating System", which includes amd64
on a 64-bit system, along with a link to "JVM properties", where you can find "java.vm.name" and "sun.arch.data.model" containing values for architecture name and bitness.
In Railo administrator, the "Overview" page (when you login) has an "Info" section which includes fields for both OS and JVM, each with either 64bit
or 32bit
after the version info.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With