Monday, April 04, 2005

Eclipse Milestone Build 3.1M6 released; SWT problem?

Eclipse Foundation has released the latest milestone build of Eclipse 3.1 for download. This version has quite a few bug fixes and some enhancements. One of the enhancements allows for plugins to be setup in JAR files instead of a directory structure.

I downloaded it today and set it up on my laptop. I then opened up the SWT application that I am currently working on at home and found that there appears to be an issue with SWT in this build. My classpath is setup correctly and the build works, but when the application launches, I get a NullReferenceException on a call to super.configureShell( shell ). This all works in Eclipse 3.1M5a. I am not sure what has changed, but I need to play around with it a little more to see what is going on.

One thing that I noticed with the new plugin setup is that the SWT DLL for Win32 is located in a totally different directory now. I think they have a little work to do on this new plugin strategy. Of course, that is why they call this beta software. It might not work for everything that you want to do.

Update: I worked with this some more tonight and it appears that there is definitely an issue with SWT in the latest milestone build. I would imagine that it might be in the swt-win32-3128.dll file, but of course, you should not bank on that information. I use milestone build M6 and pointed it ot the swt.jar and the swt-win32-3123.dll for milestone build M5a and my application works.

Technorati Tags: , ,

1 comment:

Anonymous said...

Here is what worked for me:

Grab one of the five swt-win32-3128.dll in one of the subdiretories of ...eclipse/configuration. Place a copy of this file in newly created directory ...\eclipse\plugins\org.eclipse.swt.win32_3.1.0\os\win32\x86 (or in e.g. in ...\eclipse\plugins\).

Add to a Java or SWT Run configuration on the arguments page in the VM arguments box the following line:
-Djava.library.path=${system:ECLIPSE_HOME}/plugins/org.eclipse.swt.${system:WS}_3.1.0/os/${system:OS}/${system:ARCH}
(or -Djava.library.path=${system:ECLIPSE_HOME}/plugins/ if you have chosen to place the file directly in the plugin directory).

Comments: Why do they have to distrubte five copies of the same file? The SWT Run configuration should provide the information I manually added! I created the deep directory structure because it made me feel so much in harmony with the naming conventions.