8
$\begingroup$

I recently installed the latest Wolfram Workbench plugin in my eclipse IDE (Neon.1a Release 4.6.1). Then I attempted to follow this old tutorial on generating docs with the documentation tool pallete: http://www.wolfram.com/broadcast/video.php?c=93&v=899

enter image description here

When pressing build I reiceved this message:

BUILD FAILED

/Users/admin/Documents/eclipse_workspace/test/docbuild.xml:132: The following error occurred while executing this line: /Users/admin/Documents/eclipse_workspace/test/docbuild.xml:90: taskdef A class needed by class com.wolfram.jlink.util.MathematicaTask cannot be found: org/apache/tools/ant/Task using the classloader AntClassLoader[/Applications/Mathematica.app/Contents/SystemFiles/Links/JLink/JLink.jar]

$\endgroup$
6
  • 3
    $\begingroup$ Eclipse comes in multiple versions. Install the plugin into the Java development version, not any other. Let us know if it works now. Also make sure that you have a JDK (not JRE) installed. $\endgroup$
    – Szabolcs
    Dec 14, 2016 at 9:04
  • 1
    $\begingroup$ Thanks @Szabolcs I was using c++ not java, now it works. $\endgroup$
    – M.R.
    Dec 14, 2016 at 9:11
  • 1
    $\begingroup$ I reported this more than a month ago, and suggested correcting this article: support.wolfram.com/kb/27221 The article says: "Note that the Wolfram Workbench plugin is compatible with the various standard Eclipse IDEs." After your experience I am convinced that this is not correct. $\endgroup$
    – Szabolcs
    Dec 14, 2016 at 9:13
  • $\begingroup$ Btw, do you know of any great DocumentationTools tutorials :) $\endgroup$
    – M.R.
    Dec 14, 2016 at 9:16
  • $\begingroup$ The best I know is the official docs: reference.wolfram.com/workbench/index.jsp and the videos you already know about. $\endgroup$
    – Szabolcs
    Dec 14, 2016 at 9:18

1 Answer 1

10
$\begingroup$

If you see this error:

A class needed by class com.wolfram.jlink.util.MathematicaTask cannot be found: org/apache/tools/ant/Task

then try installing the Workbench plugin into "Eclipse for Java Developers".

It seems other versions, e.g. "Eclipse for C++ Developers", lack some components that the Workbench plugin needs.

Also make sure to have the JDK (not JRE) installed.


The Workbench support article at http://support.wolfram.com/kb/27221 says,

Note that the Wolfram Workbench plugin is compatible with the various standard Eclipse IDEs.

I am not sure this is correct.

$\endgroup$
1
  • $\begingroup$ I do use Eclipse for C/C++ developers, so I doubt it is strictly necessary to download the one for Java. But it needed some extra configuration, and I have to check whether that involved adding the JDT component. I agree the support article should be corrected if it does not work "out of the box". $\endgroup$
    – ilian
    Dec 14, 2016 at 15:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.