<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<div class="moz-cite-prefix">Hello Michael,<br>
<br>
Again, it is hard or even impossible to help or/and debug without
having any true complete (and if possible minimal) way to run an
actual code and reproduce the issue.<br>
<br>
Le 03/03/2017 à 14:40, Michael Benguigui a écrit :<br>
</div>
<blockquote
cite="mid:CALvM90Jv8Qw7nA22sa5mh8BJLEpqoZn44rZr4TmSLL8Y2Fv_3g@mail.gmail.com"
type="cite">
<div dir="ltr">
<div class="gmail_signature">
<div dir="ltr">Hi all,</div>
<div>As a Scilab user, i am facing difficulties during the
Scilab 6 adaptation of my project. I did my best to isolate
the pb. This code works with Scilab 5.5. At some point of my
code, I have:</div>
<div><br>
</div>
<div>>pair = jinvoke(deployer,'deployOrLookup');<br>
>evstr('1+1');// crash!<br>
>// or<br>
>// deff('[x]=myplus(y,z)','x=y+z') // crash!</div>
<div><br>
</div>
<div>Important points:<br>
</div>
<div>
<div>- The common point of evstr and deff is it calls the
scilab compiler.<br>
</div>
</div>
<div>- deployOrLookup() calls a java method using jinvoke(),
which creates a java Process (Process process = pb.start();
) that executes another java class</div>
<div>(cmd like java -Djava.security.policy=xxx
-Dlog4j.configuration=xx -Drmi.port=xxx myClass). </div>
<div>- If the jvm already exists, deployOrLookup() does not
create it again, but just registers it..</div>
</div>
</div>
</blockquote>
<br>
Either you can provide this code, or you provide an equivalent
public one with which you get the same issue, in a way we can
copy/paste it in the console with all the required context (so lines
of codes without any leading prompts <tt>--></tt>).<br>
Otherwise, nothing prevents thinking that the issue is possibly in
the private code or in the private context instead of in Scilab
itself.<br>
<br>
By the way, if your prompt was really <tt>">"</tt> instead of <tt>"-->"</tt>,
you were not at the top level, and something else could be wrong out
of jinvoke, evstr or deff)<br>
<br>
For my part, i do not get any crash running<br>
<tt>jimport java.lang.System;</tt><tt><br>
</tt><tt>jimport java.awt.Color;</tt><tt><br>
</tt><tt>jimport java.lang.String;</tt><tt><br>
</tt><tt>// Non-static methods</tt><tt><br>
</tt><tt>jinvoke("Hello World !!", "length");</tt><tt><br>
</tt><tt>evstr('1+1');// crash!</tt><tt><br>
</tt><tt>deff('[x]=myplus(y,z)','x=y+z')</tt><tt><br>
</tt><br>
as coming from the first example of the jinvoke() help page.<br>
<br>
Regards<br>
Samuel<br>
<br>
</body>
</html>