4
$\begingroup$

Here's my problem. I need to create a link between a client that is a parallel Wolfram kernel and a server through a Java API.

I'm using Wolfram Workbench in debugging mode (like most of the time while developing).

I already found that to install Java properly on a remote kernel while debugging I have to do

ParallelEvaluate@InstallJava[MEET`Private`$DebuggerReaderLink]

The problem that I have is that using this way the client can send requests and they are received, but it cannot receive answers from the server.

But when I'm not in debugging mode and that I just do

ParallelEvaluate@InstallJava[]

answers are received.

It's quite crucial for me to be able to use the debugger in Wolfram Workbench. Would anybody have an idea of why I can't receive answers from the server in debugging mode ?

Or would there be another working way to InstallJava on parallel kernels while debugging ?

Thank you

$\endgroup$
4
$\begingroup$

After a few days of searching I finally found a solution.

The problem is that Workbench in debug mode changes the options of InstallJava on parallel kernels.

So the solution is just to use on the parallel kernels the command line used on the main kernel by InstallJava, like below.

Needs["JLink`"]
commandLine=InstallJava[]//First

LaunchKernels[1]
ParallelNeeds["JLink`"]
With[{commandLine=commandLine},
   ParallelEvaluate@InstallJava[CommandLine->commandLine]
]
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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