https://bz.apache.org/bugzilla/show_bug.cgi?id=68542

Jaikiran Pai <jaiki...@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 OS|                            |All

--- Comment #1 from Jaikiran Pai <jaiki...@apache.org> ---
Hello Yury,

Does updating your javax.classpath definition to:

  <path id="javax.classpath">
    <pathelement location="./graal-sdk-22.3.1.jar"/>
    <pathelement location="./icu4j-71.1.jar"/>
    <pathelement location="./js-22.3.1.jar"/>
    <pathelement location="./js-scriptengine-22.3.1.jar"/>
    <pathelement location="./regex-22.3.1.jar"/>
    <pathelement location="./truffle-api-22.3.1.jar"/>
  </path>


get it working? Notice that I've used js-scriptengine (instead of js-launcher)
and also used icu4j-71.1 instead of icu4j-72.1 from your example.

This following build file works fine for me (make sure you do have those exact
jars locally):

<project name="squares" default="run-squares-test">

  <path id="javax.classpath">
    <pathelement location="./graal-sdk-22.3.1.jar"/>
    <pathelement location="./icu4j-71.1.jar"/>
    <pathelement location="./js-22.3.1.jar"/>
    <pathelement location="./js-scriptengine-22.3.1.jar"/>
    <pathelement location="./regex-22.3.1.jar"/>
    <pathelement location="./truffle-api-22.3.1.jar"/>
  </path>


  <target name="run-squares-test">
    <script language="javascript" manager="javax"
classpathref="javax.classpath"> <![CDATA[
      for (i = 1; i <= 10; i++) {
        echo = squares.createTask("echo");
        echo.setMessage(i*i);
        echo.perform();
      }
    ]]> </script>
  </target>
</project>

Running "ant" on this gives:

run-squares-test:
   [script] [To redirect Truffle log output to a file use one of the following
options:
   [script] * '--log.file=<path>' if the option is passed using a guest
language launcher.
   [script] * '-Dpolyglot.log.file=<path>' if the option is passed using the
host Java launcher.
   [script] * Configure logging using the polyglot embedding API.]
   [script] [engine] WARNING: The polyglot context is using an implementation
that does not support runtime compilation.
   [script] The guest application code will therefore be executed in
interpreted mode only.
   [script] Execution only in interpreted mode will strongly impact the guest
application performance.
   [script] For more information on using GraalVM see
https://www.graalvm.org/java/quickstart/.
   [script] To disable this warning the '--engine.WarnInterpreterOnly=false'
option or use the '-Dpolyglot.engine.WarnInterpreterOnly=false' system
property.
     [echo] 1
     [echo] 4
     [echo] 9
     [echo] 16
     [echo] 25
     [echo] 36
     [echo] 49
     [echo] 64
     [echo] 81
     [echo] 100


If this works for you then, I'll update our manual to use the newer
co-ordinates for these dependencies and include an example to use it.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to