I have a Java project compiled into a jar file with a class called HttpClientSSO.
The commandline
java -cp bota.jar org.nilostep.bota.HttpClientSSO
executes the class successfully.
I want to run the class from a Mathematica Notebook. I did the following:
Needs["JLink`"]
ReinstallJava[];
LoadJavaClass["java.lang.System"];
java`lang`System`getProperty["java.version"]
DIR = "D:\\Dropbox\\DATA\\MyJavaProjects\\bota\\out\\artifacts\\bota_jar\\bota.jar";
AddToClassPath[DIR];
frm = JavaNew["java.awt.Frame"]
conn = JavaNew["org.nilostep.bota.HttpClientSSO"]
Execution returns:
1.7.0_13
JavaObject[java.awt.Frame]
$Failed
In the Mathematica message frame I get the following error:
Java failed to load class org.nilostep.bota.HttpClientSSO. >>
I have also tried:
ReinstallJava[ClassPath -> "D:\\Dropbox\\DATA\\MyJavaProjects\\bota\\out\\artifacts\\bota_jar\\bota.jar"]
LoadJavaClass["org.nilostep.bota.HttpClientSSO"];
conn = JavaNew["org.nilostep.bota.HttpClientSSO"]
but also with the result $Failed
How do I fix this?