<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Please, get jextract from here:</p>
    <p><a class="moz-txt-link-freetext" href="https://jdk.java.net/jextract/">https://jdk.java.net/jextract/</a></p>
    <p>And JDK 19 from here:</p>
    <p><a class="moz-txt-link-freetext" href="https://jdk.java.net/19/">https://jdk.java.net/19/</a></p>
    <p>These two should work well together.</p>
    <p>The Panama early access binaries are now obsolete, and should not
      be used. In fact, I think it might be time to remove them, as they
      are a constant source of confusion.</p>
    <p>Cheers<br>
      Maurizio<br>
    </p>
    <div class="moz-cite-prefix">On 20/01/2023 17:54, Martin Pernollet
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:ZzSpUV8lmIQ30uuJO5E2FyaLh6jw928DDaQdN3QloV4IXjtzqenejtQDJqjLBYY_kxYxPasCPjmR4uzzur0uiMMEVz7Ob1sKvy-XaaBnblM=@protonmail.com">
      
      <div style="font-family: Arial; font-size: 14px;">Hi all,</div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;">Just tried to
        switch to JExtract samples for JDK 19. I am suprised by the fact
        that the following imports shown in the JExtract Teapot sample
        (on master banch, hence v19) can't be resolved</div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;">
        <p style="margin:0px;font:12px Helvetica;color:rgb(217, 232,
          247)"><span style="color:rgb(204, 108, 29)">import</span> <span style="text-decoration:underline">java</span><span style="text-decoration:underline;color:rgb(230, 230, 250)">.</span><span style="text-decoration:underline">lang</span><span style="text-decoration:underline;color:rgb(230, 230, 250)">.</span><span style="text-decoration:underline">foreign</span><span style="color:rgb(230, 230, 250)">.</span>MemorySession<span style="color:rgb(230, 230, 250)">;</span></p>
        <p style="margin:0px;font:12px Helvetica;color:rgb(217, 232,
          247)"><span style="color:rgb(204, 108, 29)">import</span> <span style="text-decoration:underline">java</span><span style="text-decoration:underline;color:rgb(230, 230, 250)">.</span><span style="text-decoration:underline">lang</span><span style="text-decoration:underline;color:rgb(230, 230, 250)">.</span><span style="text-decoration:underline">foreign</span><span style="color:rgb(230, 230, 250)">.</span>SegmentAllocator<span style="color:rgb(230, 230, 250)">;</span></p>
        <br>
      </div>
      <div style="font-family: Arial; font-size: 14px;">And indeed, as
        shown by this picture, java.lang has no foreign subfolder in JDK
        19</div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><img alt="image.png" class="proton-embedded" src="cid:part1.dwFEuPv9.aAKr6Pex@oracle.com"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;">However, I found
        foreign packages to still appear in jdk.incubator module.</div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;">May this be due
        to me downloading JDK19 from the panama page? <span><a target="_blank" rel="noreferrer nofollow noopener" href="https://jdk.java.net/panama/" moz-do-not-send="true" class="moz-txt-link-freetext">https://jdk.java.net/panama/</a></span></div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div class="protonmail_signature_block" style="font-family: Arial;
        font-size: 14px;">
        <div class="protonmail_signature_block-user
          protonmail_signature_block-empty"> </div>
        <div class="protonmail_signature_block-proton"> Envoyé avec la
          messagerie sécurisée <a target="_blank" href="https://proton.me/" rel="noopener noreferrer" moz-do-not-send="true">Proton Mail</a>. </div>
      </div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div class="protonmail_quote"> ------- Original Message -------<br>
        Le lundi 2 janvier 2023 à 11:57, Jorn Vernee
        <a class="moz-txt-link-rfc2396E" href="mailto:jorn.vernee@oracle.com"><jorn.vernee@oracle.com></a> a écrit :<br>
        <br>
        <blockquote class="protonmail_quote" type="cite">
          <p>Hi Martin,<br>
          </p>
          <div class="moz-cite-prefix">On 23/12/2022 17:20, Martin
            Pernollet wrote:<br>
          </div>
          <blockquote type="cite">
            <div style="font-family: Arial; font-size: 14px;">Hi,</div>
            <div style="font-family: Arial; font-size: 14px;"><br>
            </div>
            <div style="font-family: Arial; font-size: 14px;">Would
              anyone suggest examples showing how to use Panama 19
              instead of 17? A couple of things have changed ( e.g. how
              to use the new 
              <pre style="background-color:#2b2b2b;color:#a9b7c6;font-family:'JetBrains Mono',monospace;font-size:9,8pt"><span style="color:#9876aa">locator</span>.allocateArray(<span style="color:#cc7832">new </span>ValueLayout.OfDouble(</pre>
              , and deal with all other datatypes, strings, etc).</div>
          </blockquote>
          The general idea is to either use one of the layout constants
          in the ValueLayout class, such as JAVA_DOUBLE. Or use a layout
          generated by jextract for a specific type. For strings the
          type would be a pointer, so the ValueLayout.ADDRESS layout or
          the C_POINTER layout generated by jextract can be used for
          instance.<br>
          <blockquote type="cite">
            <div style="font-family: Arial; font-size: 14px;"><br>
            </div>
            <div style="font-family: Arial; font-size: 14px;">One
              additional question : when will ARM be supported to run
              panama on Apple M1?  <br>
            </div>
          </blockquote>
          <p>MacOs/AArch64 (i.e ARM) has been supported since Java 17
            [1]<br>
          </p>
          <p>Jorn</p>
          <p>[1]: <a href="https://github.com/openjdk/jdk/pull/3617" class="moz-txt-link-freetext" rel="noreferrer nofollow
              noopener" target="_blank" moz-do-not-send="true">https://github.com/openjdk/jdk/pull/3617</a><br>
          </p>
          <blockquote type="cite">
            <div style="font-family: Arial; font-size: 14px;"><br>
            </div>
            <div style="font-family: Arial; font-size: 14px;" class="protonmail_signature_block">
              <div class="protonmail_signature_block-user
                protonmail_signature_block-empty"> </div>
              <div class="protonmail_signature_block-proton">Regards,</div>
              <div class="protonmail_signature_block-proton"><br>
              </div>
              <div class="protonmail_signature_block-proton">Martin</div>
            </div>
          </blockquote>
        </blockquote>
        <br>
      </div>
    </blockquote>
  </body>
</html>