I\'m trying to debug this problem but not sure where exactly i need to replace SWT jar file for Eclipse.
Current System Config:
Ecl
Thanks a lot guys!
I overlooked my ECLIPSE VERSION it was 64Bit and 3.6
I had to make sure it's 32Bit Eclipse, 32 Bit JVM so i uninstalled Eclipse & all JVM for clean start. Installed 32Bit JDK1.6 from here and 32Bit Eclipse from here
Check the target definition if you are working with an RCP-SWT project.
Open the target editor of and navigate to the environent definition. There you can set the architecture. The idea is that by starting up your RCP application then only the 32 bit SWT libraries/bundles will be loaded. If you have already a runtime configuration it is advisable to create a new one as well.
I removed C:\ProgramData\Oracle\Java\javapath from my path, and it worked for me.
But make sure you include x64 JDK and JRE addresses in your path.
Eclipse is launching your application with whatever JRE you defined in your launch configuration. Since you're running the 32-bit Eclipse, you're running/debugging against its 32-bit SWT libraries, and you'll need to run a 32-bit JRE.
Your 64-bit JRE is, for whatever reason, your default Installed JRE.
To change this, first make sure you have a 32-bit JRE configured in the Installed JREs preference. Go to Window -> Preferences and navigate to Java -> Installed JREs:
You can click Add and navigate to your 32-bit JVM's JAVA_HOME
to add it.
Then in your Run Configuration, find your Eclipse Application and make sure the Runtime JRE is set to the 32-bit JRE you just configured:
(Note the combobox that is poorly highlighted.)
Don't try replacing SWT jars, that will likely end poorly.
Just add -d32 to VM arguments in the "Edit launch configuration properties".
Well, duh :) SWT uses JNI ... and JNI is strictly platform specific.
Use 32-bit libraries with a 32-bit JVM, 64-bit libraries with a 64-bit JVM, make sure the versions match exactly, and don't mix'n'match.
IMHO...
PS: You can have multiple JVMs and/or multiple Eclipse's co-existing on the same box.