Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » use glpk jar in org.xtext.example.mydsl.ui.popup.actions
use glpk jar in org.xtext.example.mydsl.ui.popup.actions [message #758944] Fri, 25 November 2011 11:24 Go to next message
Stefano  is currently offline Stefano Friend
Messages: 2
Registered: November 2011
Junior Member
I need to use the glpk jar in org.xtext.example.mydsl.ui.popup.actions.NewAction

package org.xtext.example.mydsl.ui.popup.actions;

import org.eclipse.jface.action.IAction;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.jface.viewers.ISelection;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.ui.IObjectActionDelegate;
import org.eclipse.ui.IWorkbenchPart;
import org.gnu.glpk.GlpkSolver;

public class NewAction implements IObjectActionDelegate {

private Shell shell;

* Constructor for Action1.
public NewAction() {

* @see IObjectActionDelegate#setActivePart(IAction, IWorkbenchPart)
public void setActivePart(IAction action, IWorkbenchPart targetPart) {
shell = targetPart.getSite().getShell();

* @see IActionDelegate#run(IAction)
public void run(IAction action) {

GlpkSolver glp = new GlpkSolver();
"New Action was executed.");

* @see IActionDelegate#selectionChanged(IAction, ISelection)
public void selectionChanged(IAction action, ISelection selection) {


I tried all ways to add jar, described here:

but when I run the command, I have this exception :

java.lang.NoClassDefFoundError: org/gnu/glpk/GlpkSolver
at org.eclipse.ui.internal.PluginAction.runWithEvent(
at org.eclipse.jface.action.ActionContributionItem.handleWidgetSelection(
at org.eclipse.jface.action.ActionContributionItem.access$2(
at org.eclipse.jface.action.ActionContributionItem$5.handleEvent(
at org.eclipse.swt.widgets.EventTable.sendEvent(
at org.eclipse.swt.widgets.Widget.sendEvent(
at org.eclipse.swt.widgets.Display.runDeferredEvents(
at org.eclipse.swt.widgets.Display.readAndDispatch(
at org.eclipse.ui.internal.Workbench.runEventLoop(
at org.eclipse.ui.internal.Workbench.runUI(
at org.eclipse.ui.internal.Workbench.access$4(
at org.eclipse.ui.internal.Workbench$
at org.eclipse.core.databinding.observable.Realm.runWithDefault(
at org.eclipse.ui.internal.Workbench.createAndRunWorkbench(
at org.eclipse.ui.PlatformUI.createAndRunWorkbench(
at org.eclipse.ui.internal.ide.application.IDEApplication.start(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.runApplication(
at org.eclipse.core.runtime.internal.adaptor.EclipseAppLauncher.start(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at java.lang.reflect.Method.invoke(
at org.eclipse.equinox.launcher.Main.invokeFramework(
at org.eclipse.equinox.launcher.Main.basicRun(
at org.eclipse.equinox.launcher.Main.main(
Caused by: java.lang.ClassNotFoundException: org.gnu.glpk.GlpkSolver
at org.eclipse.osgi.internal.loader.BundleLoader.findClassInternal(
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
at org.eclipse.osgi.internal.loader.BundleLoader.findClass(
at org.eclipse.osgi.internal.baseadaptor.DefaultClassLoader.loadClass(
at java.lang.ClassLoader.loadClass(

I attached the project and the jar folder
  • Attachment:
    (Size: 463.76KB, Downloaded 103 times)
  • Attachment: project.tar.gz
    (Size: 86.02KB, Downloaded 85 times)

[Updated on: Fri, 25 November 2011 11:25]

Report message to a moderator

Re: use glpk jar in org.xtext.example.mydsl.ui.popup.actions [message #758954 is a reply to message #758944] Fri, 25 November 2011 11:44 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 13885
Registered: July 2009
Senior Member

Need professional support for Xtext, Xpand, EMF?
Go to:
Twitter : @chrdietrich
Blog :
Re: use glpk jar in org.xtext.example.mydsl.ui.popup.actions [message #758982 is a reply to message #758954] Fri, 25 November 2011 13:26 Go to previous message
Stefano  is currently offline Stefano Friend
Messages: 2
Registered: November 2011
Junior Member
thanx Smile
Previous Topic:[Xtext 2.1] Implementing a custom post build step
Next Topic:Validator Check Unique Name
Goto Forum:

Current Time: Sun Apr 18 03:48:33 GMT 2021

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

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

Back to the top