I have no trouble compiling and running the sample Java to Mathematica program SampleProgram.java
that can be found in the Wolfram installation:
FileNames["SampleProgram.java", {$InstallationDirectory}, Infinity]
(* {"/usr/local/Wolfram/Mathematica/10.2/SystemFiles/Links/JLink/Examples/Part2/SampleProgram.java"} *)
When I try to compile and run a modified copy of this program from a different directory I get the following error message:
Error: Could not find or load main class files.wolfram
It seems it should be looking for com.wolfram.jlink.*
. I am quite sure the classpath to JLink.jar
is correct.
Does JLink.jar
contain a manifest pointing to some other resource that it cannot find?
Any help you could provide would be greatly appreciated.
javac
(compiling) orjava
(running)? -- (no, there is no reference tofiles.wolfram
in the manifest.) $\endgroup$