<div dir="ltr"><div>And sorry for the wrong title since there is no link with a "new started jvm".. my process simply executing "echo".</div><div><br></div><div>Regards</div><div>Michael</div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-05 21:12 GMT+01:00 Michael Benguigui <span dir="ltr"><<a href="mailto:michael.benguigui@activeeon.com" target="_blank">michael.benguigui@activeeon.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div>Hi all,</div><div><br></div><div>I managed to make a simpler program to reproduce the pb. Here it is</div><div><br></div><div>A java class:</div><div><br></div><div>public class MyEchoClass {</div><div>      public static void execEcho () throws IOException {<br>        ArrayList<String> cmd = new ArrayList<String>();<br>        cmd.add("echo");<br>        cmd.add("\"AAAA\"");<br>        ProcessBuilder pb = new ProcessBuilder(cmd);<br>        pb.start();<br>    }<br></div><div>}</div><div><br></div><div>In Scilab:</div><div><br></div><div>jinvoke(MyEchoClass,'execEcho'<wbr>);<br>disp('before...');<br>evstr('1+1;');<br>disp('...after');</div><div><br></div><div>The result:</div><div><br></div><div>before...</div><div><img width="306" height="157" style="margin-right:0px" alt="Images intégrées 1" src="cid:ii_15aa0168fe0c5d20"></div><div><br></div><div>Regards</div><div>Michael<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-03-03 20:20 GMT+01:00 Samuel Gougeon <span dir="ltr"><<a href="mailto:sgougeon@free.fr" target="_blank">sgougeon@free.fr</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
  
    
  
  <div text="#000000" bgcolor="#FFFFFF">
    <div class="m_5523435617969169256m_-8258193266785895207moz-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 type="cite">
      <div dir="ltr">
        <div class="m_5523435617969169256m_-8258193266785895207gmail_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,'deployOrLook<wbr>up');<br>
            >evstr('1+1');// crash!<br>
            >// or<br>
            >// deff('[x]=myplus(y,z)','x=y+z'<wbr>) // 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'<wbr>)</tt><tt><br>
    </tt><br>
    as coming from the first example of the jinvoke() help page.<br>
    <br>
    Regards<span class="m_5523435617969169256HOEnZb"><font color="#888888"><br>
    Samuel<br>
    <br>
  </font></span></div>

<br>______________________________<wbr>_________________<br>
users mailing list<br>
<a href="mailto:users@lists.scilab.org" target="_blank">users@lists.scilab.org</a><br>
<a href="http://lists.scilab.org/mailman/listinfo/users" target="_blank" rel="noreferrer">http://lists.scilab.org/mailma<wbr>n/listinfo/users</a><br>
<br></blockquote></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div class="m_5523435617969169256gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Michael Benguigui, Activeeon<br>+33 6 304 37 37 0<br><a href="https://fr.linkedin.com/in/micha%C3%ABl-benguigui-23a85921" target="_blank">https://fr.linkedin.com/in/<wbr>micha%C3%ABl-benguigui-<wbr>23a85921</a><br>skype: <a href="mailto:michael.benguigui@hotmail.fr" target="_blank">michael.benguigui@hotmail.fr</a></div></div></div>
</font></span></div>
</blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div>Michael Benguigui, Activeeon<br>+33 6 304 37 37 0<br><a href="https://fr.linkedin.com/in/micha%C3%ABl-benguigui-23a85921" target="_blank">https://fr.linkedin.com/in/micha%C3%ABl-benguigui-23a85921</a><br>skype: <a href="mailto:michael.benguigui@hotmail.fr" target="_blank">michael.benguigui@hotmail.fr</a></div></div></div>
</div>