Message Boards Message Boards

1
|
14465 Views
|
4 Replies
|
2 Total Likes
View groups...
Share
Share this post:

How do I fix this error when importing a custom Java class in J/Link?

Posted 10 years ago
POSTED BY: Wren Rudolph
4 Replies

I found that you do not need to do the ReinstallJava[]:

This works and solves the problem:

Needs["JLink`"];

InstallJava[CommandLine -> "/usr/bin/java"];

AddToClassPath["/Users/xxxx/WhereverYouWantThis"];

POSTED BY: Neil Singer

Tks Jean! It solver my problem too. Very useful.

POSTED BY: Rodrigo Murta

I know it's silly and bad form to reply to my own post, but minutes after hitting the "Publish" button I found out that all I had to do was to point JLink to the correct location of the java executable. So, with the current versions of JDK 8, this gives:

Needs["JLink`"]; InstallJava[]; ReinstallJava[CommandLine -> "/usr/bin/java"];

and then after that everything works fine for me.

POSTED BY: Jean-Yves Hervé

Hi,

Nobody seems to have replied to your post after 5 months. Did you eventually find a solution or just gave up? I am encountering the same problem with code that used to run just fine with Mathematica 8 and JDK 7 about 1.5 year ago.

Thank you in advance for any help or pointers.

jyh.

POSTED BY: Jean-Yves Hervé
Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
Attachments
Remove
or Discard

Group Abstract Group Abstract