I’ve just downloaded the last Eclipse 3.4.1 for Mac OS X and went through the “Simple plug-in example” to try to get a picture about how to develop plug-ins for pictures.
Basically the problem was when I tried to start the plug-in that I got an error. Basically in the error log there’s something like:
java.lang.UnsatisfiedLinkError: Cannot load 32-bit SWT libraries on 64-bit JVM
The error is quite clear, it seems that SWT libraries are 32 bits and my environment is 64 JVM. As I’m just a newbie with Leopard I don’t really know how to check if the java version that I’ve in the system is 32 or 64 bits as the java -version doesn’t say anything about that.
I tried to run the java 1.6 that’s also in the system, then the output for java version it was like that:
/System/Library/Frameworks/JavaVM.framework/Versions/1.6/Commands/java -version
java version "1.6.0_07"
Java(TM) SE Runtime Environment (build 1.6.0_07-b06-153)
Java HotSpot(TM) 64-Bit Server VM (build 1.6.0_07-b06-57, mixed mode)
The “64-Bit Server VM” makes it clear. That made me wonder what JVM is Eclipse using, first I checked the project properties and the Java Compiler was set to 1.5 level. But still the problem was there.
Later on I remembered that Eclipse uses your preferred JVM to run your programs independently of whatever compliance level is set in the project (or Eclipse). So the key to solve that issue is to change your default JVM in the Eclipse preferences under the “Installed JREs” to point to JVM 1.5.0.
If 1.5.0 is the default in the Mac OS X system why Eclipse did choose 1.6 as the default one?
