[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[news.eclipse.tools.ve] Re: java.lang.NoClassDefFoundError and java.lang.IllegalAccessException in VE 1.1

Hi Thomas,

When looking into the .log-file, I saw the following entry:

!ENTRY org.eclipse.jem.proxy 2 0 2005-07-30 01:32:33.187
!MESSAGE
!STACK 0
IWAV0073I *** RemoteVM Exception - Trace from Remote VM:
java.lang.UnsatisfiedLinkError: no swt-win32-3138 in java.library.path

The Eclipse project that you are editing your class in - how is this configured ? There are several options that are allowed by the VE for SWT.


1 - The project is a Plug-in project that has org.eclipse.swt as a dependent (usually indirectly by virtue of having org.eclipse.ui in its list of dependencies)

2 - The project has SWT_Container in the build path. The easist way to do this is just create a Java project and then use the New Visual Class Wizard and take one of the SWT options whereupon it will be configured for you. Once this has occured if you select the properties of the SWT_Container you can specify several options about where you want SWT loaded from - either the version the IDE is using, the version of your target platform or a custom location

3 - What will not work is if you have put swt.jar into your build path. I suspect that this may be what you have done. We do have a bugzilla open so that we do a better job of letting the user know if this is what they have done (because you would not be the first person to add swt.jar and expect the VE to work) that is https://bugs.eclipse.org/bugs/show_bug.cgi?id=104126. However even with just swt.jar in the build path although the JDT will compile the class OK it is not enough for us as we need to know the .dll (or .lib on Linux, etc...) and do the correct library path manipulation so that is what the SWT_Container is for


Obviously, the remote VM is not able to extract the SWT path from my launch configuration, where it is added:
-Djava.library.path=C:\Java\Eclipse-3.1\eclipse\configuration\org.eclipse.osgi\bundles\61\1\.cp
and I can launch the application without problem in the Eclipse IDE.

Right - the way the VE gets the .dll location is from the SWT_Container. We don't look at any other configurations and try to extract it from them.


So I added the SWT directory to the PATH environment variable - and now a different error occurs:
- java.lang.IllegalAccessException(Class org.eclicpse.jem.internal.proxy.initParser.tree.ExpressionProcesser can not access a member of class org.eclipse.swt.widgets.Composite with modifiers "")


Nothing more seems to be written to the .log-file.
What is going wrong here?

Although adding the .dll location to the PATH got past the linkage error there will be other problems. The presence of the SWT_Container OR the org.eclipse.swt project is picked up by the VE and used to do things like add entries to the palette, extra .jar files containing support code for the VE to the target VM and also tell the VE where to get the location of the BeanInfo files and EMF .override files. Your error is probably related to the lack of one or all of these


Try removing swt.jar from the build path. Then using the Add Libraries button on the Java build path - select Standard Widget Toolkit and then things should be OK for you.

Best regards,

Joe Winchester