I am trying to reconfigure my Java WindowBuilder SWT application to be 64-bit, not 32-bit.
My development machine is Windows (Win7, 64-bit), but the code needs to run on CENTOS too. Everything was working as 32-bit.
I cannot seem to shake this error. I did see the following articles here on StackOverflow. issue 1, issue 2, issue 3
As per other developers recommendations, I did the following: 1. I went Window | Preferences and set the JRE to the 64-bit version
- I then made absolutely sure to reference the 64-bit version of the SWT file. I even placed the 64-bit SWT in the project's /lib folder. Steps: Right click project | Build Path | Configure Build Path... | Libraries
- The run (project right click | Run As | Run Configuration...) and debug (project right click | Debug As | Debug Configuration...) configurations use the project environment JRE, which is what I set in step 1, or so I think.
I modified the eclipse.ini (with Eclipse closed) and added the following line to the end:
-vm "C:\Program Files\Java\jre7/bin/javaw.exe"
The 32-bit version is in "C:\Program Files (x86)".
I am still new to Java programming, so what step did I miss?
I am seeing the error if I run from the project folder in a command window or through Eclipse using the Debug configuration (F11 in Debug view).
Command Line Error:
Debugging Error:
UPDATE: I might have answered my question, just not sure. I see at the bottom of this issue that the author said that he overlooked the Eclipse version. I see via the shortcut properties that I am using the 32-bit version (installed into the "C:\Program Files (x86)" folder). As there is no installatino program, I assume that I downloaded the 32-bit version. Could that be the problem? (I am trying the 64-bit version now.)
I would think that switching SWT over like I did would have solved the problem or can 32-bit Eclipse only produce 32-bit and not 64-bit?
That would seem to bring up another interesting question, although the other article answers this question too, that 64-bit Eclipse can build 64-bit and 32-bit Eclipse 32-bit, not mix and match like Visual Studio, even if you do set the libraries correctly. I will see.