JFace getting started

N

Nicklas

Hi

I try to run a simple SWT/Jface example. I am running this from inside
eclipse 3.2.0 and I have included the following in my classpath:
swt.jar - Taken from swt-3.3M3-win32-win32-x86.zip
jface.jar - Taken from program files\eclipse\plugins and Renamed from

org.eclipse.jface_3.2.0.I20060605-1400.jar


Here is the class:

import org.eclipse.jface.window.*;
import org.eclipse.swt.widgets.*;

public class MyJFaceExample1 extends Window {

public MyJFaceExample1() {
// super(null); //Wont compile with null as the beginner example says
it should
super(new Shell()); //Compiles
}

public static void main(String[] args) {
MyJFaceExample1 demo = new MyJFaceExample1();
demo.setBlockOnOpen(true);
demo.open();
Display.getCurrent().dispose();
}

------------------------------------------------------------

This compiles fine but when I try to run this I get:
java.lang.NoClassDefFoundError:
org/eclipse/core/commands/common/EventManager

I then copy c:\program
files\eclipse\plugins\org.eclipse.core.commands_3.2.0.I20060605-1400.jar
and rename it to core.jar.

I then get the following error: java.lang.NoClassDefFoundError:
org/eclipse/core/runtime/ListenerList

Then I am stuck.

Please help me with getting started with JFace.
 
Joined
Aug 28, 2007
Messages
2
Reaction score
0
Nicklas;

Had same problem with a small JFace program.

class not found: "EventManager"
I included corecommands.jar like you,then,
class not found: "ListenerList"

I found "ListenerList" in: org.eclipse.equinox.common....jar.
in Eclipse 3.2 and now 3.3.

All was fine after that.

Hope this helps if problem is still there.

Bobw
 
Last edited:
Joined
Aug 28, 2007
Messages
2
Reaction score
0
Nicklas said:
Hi

I try to run a simple SWT/Jface example. I am running this from inside
eclipse 3.2.0 and I have included the following in my classpath:
swt.jar - Taken from swt-3.3M3-win32-win32-x86.zip
jface.jar - Taken from program files\eclipse\plugins and Renamed from

org.eclipse.jface_3.2.0.I20060605-1400.jar


Here is the class:

import org.eclipse.jface.window.*;
import org.eclipse.swt.widgets.*;

public class MyJFaceExample1 extends Window {

public MyJFaceExample1() {
// super(null); //Wont compile with null as the beginner example says
it should
super(new Shell()); //Compiles
}

public static void main(String[] args) {
MyJFaceExample1 demo = new MyJFaceExample1();
demo.setBlockOnOpen(true);
demo.open();
Display.getCurrent().dispose();
}

------------------------------------------------------------

This compiles fine but when I try to run this I get:
java.lang.NoClassDefFoundError:
org/eclipse/core/commands/common/EventManager

I then copy c:\program
files\eclipse\plugins\org.eclipse.core.commands_3.2.0.I20060605-1400.jar
and rename it to core.jar.

I then get the following error: java.lang.NoClassDefFoundError:
org/eclipse/core/runtime/ListenerList

Then I am stuck.

Please help me with getting started with JFace.

Nicklas;
You will find "ListenerList" in org.eclipse.equinox.common....jar
in Eclipse 3.2 ande 3.3

Had your exact problem

BobW
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,581
Members
45,056
Latest member
GlycogenSupporthealth

Latest Threads

Top