Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » Standalone SWT/JFace applications require the OSGi framework?
Standalone SWT/JFace applications require the OSGi framework? [message #437511] Mon, 07 June 2004 01:37 Go to next message
Adam Warner is currently offline Adam WarnerFriend
Messages: 4
Registered: July 2009
Junior Member
Hi all,

I'm working upon a SWT/JFace Eclipse 3.0RC1 standalone GUI and I've just
added a menu bar with a File/Quit menu item.

When I select the Quit option I receive this message:

java.lang.NoClassDefFoundError: org/osgi/framework/InvalidSyntaxException
at org.eclipse.core.runtime.Platform.isRunning(Platform.java:12 32)
at org.eclipse.jface.util.Policy.getDebugOption(Policy.java:100 )
at org.eclipse.jface.util.Policy.<clinit>(Policy.java:51)
at org.eclipse.jface.action.ActionContributionItem.handleWidget Selection(ActionContributionItem.java:909)
at org.eclipse.jface.action.ActionContributionItem.access$2(Act ionContributionItem.java:866)
at org.eclipse.jface.action.ActionContributionItem$7.handleEven t(ActionContributionItem.java:785)
at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java :82)
at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:944)
at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.ja va:2512)
at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java :2223)
at org.eclipse.jface.window.Window.runEventLoop(Window.java:668 )
at org.eclipse.jface.window.Window.open(Window.java:648)
at gui.GuiApplication.main(GuiApplication.java:50)

Am I supposed to locate and download an OSGi implementation from IBM
(assuming it is appropriately licensed) or is this class dependency
spurious?

My menu bar instantiation is rudimentary:

public class GuiApplication extends ApplicationWindow {
...
protected MenuManager createMenuManager() {
MenuManager menu = new MenuManager("");
MenuManager file_menu = new MenuManager("&File");
MenuManager edit_menu = new MenuManager("&Edit");
MenuManager help_menu = new MenuManager("&Help");
menu.add(file_menu);
menu.add(edit_menu);
menu.add(help_menu);
file_menu.add(new QuitAction(this));
return menu;
}
...
}

public class QuitAction extends Action {
ApplicationWindow current_window;

public QuitAction (ApplicationWindow window) {
current_window = window;
this.setText("&Quit@Ctrl+Q");
}
public void run() {
current_window.close();
}
}

Thanks,
Adam
Re: Standalone SWT/JFace applications require the OSGi framework? YES [message #437512 is a reply to message #437511] Mon, 07 June 2004 04:06 Go to previous messageGo to next message
Adam Warner is currently offline Adam WarnerFriend
Messages: 4
Registered: July 2009
Junior Member
My follow up to:
java.lang.NoClassDefFoundError: org/osgi/framework/InvalidSyntaxException

I overlooked the jar available in
../eclipse/plugins/org.eclipse.osgi_3.0.0/osgi.jar

The jar contains org.osgi.* classes in addition to the usual Eclipse
org.eclipse.* classes.

Regards,
Adam
Re: Standalone SWT/JFace applications require the OSGi framework? YES [message #438009 is a reply to message #437512] Mon, 14 June 2004 18:01 Go to previous message
Douglas Pollock is currently offline Douglas PollockFriend
Messages: 84
Registered: July 2009
Member
Adam Warner wrote:
> The jar contains org.osgi.* classes in addition to the usual Eclipse
> org.eclipse.* classes.

I'm not sure if this dependency was intentional on our part. I've filed Bug
67050 ("https://bugs.eclipse.org/bugs/show_bug.cgi?id=67050").



cheers,
d.
Previous Topic:How to maximize and minimize a view programmatically?
Next Topic:Keyboard navigation in a Table?
Goto Forum:
  


Current Time: Thu Apr 25 10:51:16 GMT 2024

Powered by FUDForum. Page generated in 0.04098 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top