0

I'm trying to write a SWT app in Eclipse, in a 32 bits Ubuntu 12.04 system. It works fine but when I try to execute it on my 64 bit Windows 7 system, I get an error: cannot load 32-bit swt libraries on 64-bit jvm

Well, the problem is pretty clear. But, what can I do about it? Can I build a 64 bit version of my program on a 32 bit system, or do I really need to get a 64 bit Ubuntu set up just for this?

rgargente
  • 1,821
  • 2
  • 19
  • 30

1 Answers1

0

There are two solutions:

  • Long and correct: http://www.eclipse.org/swt/faq.php#multiplatformjar
  • Quick hack: download a 64 bits Windows (or whatever SO you are running) version of SWT and copy the swt.jar file into %JAVA_HOME%\lib\ext directory (C:\Program Files\Java\jre7\lib\ext by default in Windows). Then just execute the JAR and it will run, even if the packaged SWT library is for another system.

Some more details here: http://spacesciencesoftware.wordpress.com/2013/08/29/building-a-64-bits-java-swt-application-in-a-32-bits-system/

rgargente
  • 1,821
  • 2
  • 19
  • 30
  • 1
    Please never just post a link. When the link becomes unreachable, your answer will be useless. Add a summary here as well. – Baz Aug 29 '13 at 13:18