Eclipse/ant config problem

I've followed the tutorial for setting up eclipse to compile jme (very easy to follow) - but when I get to the step to actually build it from the build.xml file it does not work properly.  I right click and go to 2 ant build, and it returns the error "No targets could be determined for the buildfile".  The error log shows this:

Message: Internal error occurred retrieving targets

Exception Stack Trace: java.lang.NoClassDefFoundError: org/apache/tools/ant/Main



at org.eclipse.ant.internal.ui.model.AntModelProject.init(

at org.eclipse.ant.internal.ui.model.AntModel.initializeProject(

at org.eclipse.ant.internal.ui.model.AntModel.prepareForFullParse(

at org.eclipse.ant.internal.ui.model.AntModel.parseDocument(

at org.eclipse.ant.internal.ui.model.AntModel.reconcile(

at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(

at org.eclipse.ant.internal.ui.model.AntModel.getProjectNode(

at org.eclipse.ant.internal.ui.AntUtil.getTargets(

at org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsTab$

at org.eclipse.jface.operation.ModalContext.runInCurrentThread(


at org.eclipse.jface.window.ApplicationWindow$

at org.eclipse.swt.custom.BusyIndicator.showWhile(



at org.eclipse.ui.internal.progress.ProgressManager$

at org.eclipse.swt.custom.BusyIndicator.showWhile(

at org.eclipse.ui.internal.progress.ProgressManager.runInUI(

at org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsTab.getTargets(

at org.eclipse.ant.internal.ui.launchConfigurations.AntTargetsTab.initializeFrom(

at org.eclipse.debug.ui.AbstractLaunchConfigurationTabGroup.initializeFrom(

at org.eclipse.ant.internal.ui.launchConfigurations.AntTabGroup.initializeFrom(

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.displayInstanceTabs(

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer$

at org.eclipse.swt.custom.BusyIndicator.showWhile(

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.inputChanged(

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationTabGroupViewer.setInput(

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationPropertiesDialog.initializeContent(

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.createContents(

at org.eclipse.jface.window.Window.create(

at org.eclipse.jface.dialogs.Dialog.create(

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchConfigurationsDialog.create(




at org.eclipse.debug.ui.DebugUITools.openLaunchConfigurationDialog(

at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchShortcut.launch(

at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchShortcut.launch(

at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchShortcut.launch(

at org.eclipse.ant.internal.ui.launchConfigurations.AntLaunchShortcut.launch(

at org.eclipse.debug.internal.ui.launchConfigurations.LaunchShortcutExtension.launch(


at org.eclipse.jface.action.Action.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.createAndRunWorkbench(

at org.eclipse.ui.PlatformUI.createAndRunWorkbench(


at org.eclipse.core.internal.runtime.PlatformActivator$

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.core.launcher.Main.invokeFramework(

at org.eclipse.core.launcher.Main.basicRun(


at org.eclipse.core.launcher.Main.main(

Now I suspect that means that eclipse is not meshing with ant properly, but since I usually don't use eclipse I am not sure what the problem would be - if anyone can shed some light on the issue I would be grateful.

I read some of the other topics, and tried using the method of dragging the buildfile to the ant pane instead of right clicking.  That resulted in a "Problems occurred when invoking code from plug-in: "org.eclipse.jface"." message, with a similar trace to the first one.

Here is my eclipse version info, if it matters:

Eclipse SDK

Version: 3.2.2

Build id: M20070212-1330 ('Ubuntu' version: 3.2.2-3ubuntu3)

Both eclipse and ant were installed and configured by apt, I did not make any changes to them.  Last but not least -  the teapot demo works properly, so eclipse seems integrated with java fine.  ant also runs the build if I navigate to the directory with the buildfile and issue an 'ant' in the terminal:


Total time: 29 seconds"

It seems like it does not find that class org/apache/tools/ant/Main, the needed package is not in the classpath!?!?!

Turns out they made the ant package wrong or something.  I extracted the ant-launcher files, copied them into the launch folder in ant.jar and rezipped it, then put it back where it should be - that fixed the problems.  I am not sure if this issue is unique to ubuntu, but the problem was in the default install of eclipse/ant directly from the repository.

I think it is bug of the package for Ubuntu. I have version of Eclipse for Mac. Though, in the latest two years I have used several versions of Eclipse also under Slackware and Gentoo. And I have almost surelly used also Eclipse 3.2.2, because I update regularly. Though I never used distribution packages. I always downloaded it directly from Eclipse home page. I do not understand why to use a distribution package of an application that is already perfectly packaged as it is. Though, this is my personal consideration. Apart this I do not trust package maintainers of some Linux distributions. Recently, about september I got a broken Gentoo after a simple full update from repository because they decided to break support for some packages. Weird Tales!