1

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

enter image description here

  1. 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

enter image description here

  1. 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.

enter image description here

  1. 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:

enter image description here

Debugging Error:

enter image description here

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.

Community
  • 1
  • 1
Sarah Weinberger
  • 15,041
  • 25
  • 83
  • 130

1 Answers1

0

I'm answering your "another interesting question".

In Eclipse there is a Feature called 'Delta Pack' which makes Eclipse able to export RCP applications into different platforms than the Eclipse you're looking at. It knows how to make 32/64 bits too.

But it has disadvantages:

1.) It's somewhat slow to export (a half minute maybe)

2.) You have to debug your application via Remote Java Application debugging (on localhost probably)

I'm not sure about the second point; I was fixing a UI bug which only appeared on Ubuntu exports so I had to debug it on a virtual-machine as a Remote app.

Adam Horvath
  • 1,249
  • 1
  • 10
  • 25