Source Support

The Wolfram Workbench provides a number of useful features for working with code in J/Link projects.

Classnotfound Errors

If your Mathematica code uses J/Link functions to access Java code, then the Workbench checks that these classes are known to the project Java classpath. If a class cannot be found then an error is introduced, as shown below.

J/Link Class Error

The error is that the Workbench cannot find the class tools`MyClass. If you see an error like this you should check that the class is included in the source folder and that you have used the correct name.

You can disable this error by including the following metadata comment at the top of your source file.

(*! ProblemDetectorDisable[classlocator]  !*)

Class Find Definition

You can use the Workbench Find Definition functionality to go to the source code for a class. You should select the class name as it appears in a J/Link function such as JavaNew, then right-click and choose Find Definition.

J/Link Class Error


If you find that the functionality described in this page does not work, make sure that your project is set up as a J/Link project, as described in the J/Link project section.