Cannot load 32-bit SWT libraries on 64-bit JVM
I've been doing a little application maintenance today and restoring my standalone version of ColdFusion Builder 2, making sure it has all of the Eclipse plugins and extras that I use on a daily basis.
I fell foul of a common issue that although I've dealt with before, still took a few minutes to recall the solution and resolve the problem. As such I've posted here for my own sanity and to help any others who may stumble into the same situation.
After running an ANT task on one my ColdFusion projects, I received the following error:
"Cannot load 32-bit SWT libraries on 64-bit JVM"
Essentially, this indicates a clash between the java library used by the plugin and the JVM used by the machine.
The fix is a simple one. Open the installed JRE window via the Properties menu: Eclipse -> Preferences -> Java -> Installed JRE
(the menu options may differ slightly between various versions of Eclipse or Eclipse-based applications)
With the default JRE selected, hit the Edit button to proceed to the next window.
Alter the Default VM Arguments field by adding -d32, which ensures that the 32-bit JVM is used instead of the 64. This should remove the error and you can continue as normal.
My ANT build is now back to working as expected with a little tweak to the JVM definition. Good times.