<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <p>Hi Martin,<br>
      jextract has multiple branches - you should switch to the jdk19
      branch, and then you will find all the samples working against
      jdk19.</p>
    <p>I suggest you do that first before doing jdk20 (for which there's
      no available downloadable jextract binaries yet).</p>
    <p>A binary build for jextract is available here:</p>
    <p><a class="moz-txt-link-freetext" href="https://jdk.java.net/jextract/">https://jdk.java.net/jextract/</a></p>
    <p>Note that this page contains links to the correct bits of the
      documentation (including jextract branch and samples).</p>
    <p>This should be enough to get started with 19. As soon as Java 20
      ships, the same will be available for Java 20.<br>
    </p>
    <p>Maurizio<br>
    </p>
    <div class="moz-cite-prefix">On 28/12/2022 16:01, Martin Pernollet
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:zVTT12S1WNw4EcPMeaWp74lGXMH2Kh310wQ6xTpJPDhyf8CYLLKXqe1jxzIXE1DxRKeiRXZqYQV3Vla2pMBocLvGPHPFZh3BCvwkiTVbrDM=@protonmail.com">
      
      <div style="font-family: Arial; font-size: 14px;">Thank you. I
        know these documents and rather lacks complete exemples that can
        work for an identified JDK version.</div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;">I went back to
        JExtract samples, especially the opengl <a href="https://urldefense.com/v3/__https://github.com/openjdk/jextract/blob/master/samples/opengl/Teapot.java__;!!ACWV5N9M2RV99hQ!Kerbjc2UKkc4goX1QR-WkkEnACuyafoEWQ0nochEnCQ0VbVq_Ro15__pJVthqwsrTgatzLaSx9ddWt-hfVVYruFAS-H77hIGI1Mhfg$" title="teapot" moz-do-not-send="true">teapot</a>, but I can't
        compile it with JDK 19... seamingly the <a href="https://urldefense.com/v3/__https://github.com/openjdk/jextract/blob/master/samples/opengl/Teapot.java*L32__;Iw!!ACWV5N9M2RV99hQ!Kerbjc2UKkc4goX1QR-WkkEnACuyafoEWQ0nochEnCQ0VbVq_Ro15__pJVthqwsrTgatzLaSx9ddWt-hfVVYruFAS-H77hL2GhS8mg$" title="imports refer to the JDK 20 package names" moz-do-not-send="true">imports refer to the JDK 20 package
          names</a>.</div>
      <div style="font-family: Arial; font-size: 14px;"><br>
      </div>
      <div style="font-family: Arial; font-size: 14px;">What I still
        miss is 
        <p style="margin:0px;font:12px Helvetica;color:rgb(128, 128,
          128)">import static jdk.incubator.foreign.CLinker.C_INT</p>
        <p style="margin:0px;font:12px Helvetica;color:rgb(128, 128,
          128)"><br>
        </p>
        <p style="margin:0px;font:12px Helvetica;color:rgb(128, 128,
          128)"><span style="font-family: Arial; font-size: 14px; color:
            rgb(0, 0, 0);">and other C_TYPE. </span></p>
        <p style="margin:0px;font:12px Helvetica;color:rgb(128, 128,
          128)"><span style="font-family: Arial; font-size: 14px; color:
            rgb(0, 0, 0);"><br>
          </span></p>
        <p style="margin:0px;font:12px Helvetica;color:rgb(128, 128,
          128)"><span style="font-family: Arial; font-size: 14px; color:
            rgb(0, 0, 0);">They where static constants in JDK17 but then
            have gone. Where should we find this as of JDK19?</span></p>
      </div>
      <div class="protonmail_signature_block" style="font-family: Arial;
        font-size: 14px;">
        <div class="protonmail_signature_block-proton"><br>
        </div>
        <div class="protonmail_signature_block-proton">Thanks in
          advance!</div>
        <div class="protonmail_signature_block-proton"><br>
        </div>
      </div>
      <div class="protonmail_quote"> ------- Original Message -------<br>
        Le mercredi 28 décembre 2022 à 14:34, Maurizio Cimadamore
        <a class="moz-txt-link-rfc2396E" href="mailto:maurizio.cimadamore@oracle.com"><maurizio.cimadamore@oracle.com></a> a écrit :<br>
        <br>
        <blockquote class="protonmail_quote" type="cite">
          <p>Hi,<br>
            I suggest you start looking at some of the documents we have
            available to get started - for JDK 19 you can look here:</p>
          <p><a href="https://urldefense.com/v3/__https://github.com/openjdk/panama-foreign/blob/21452ec32b27ba906ec06253e4a7af9037728174/doc/panama_memaccess.md__;!!ACWV5N9M2RV99hQ!Kerbjc2UKkc4goX1QR-WkkEnACuyafoEWQ0nochEnCQ0VbVq_Ro15__pJVthqwsrTgatzLaSx9ddWt-hfVVYruFAS-H77hJVqw6NUw$" class="moz-txt-link-freetext" rel="noreferrer nofollow
              noopener" target="_blank" moz-do-not-send="true">https://github.com/openjdk/panama-foreign/blob/21452ec32b27ba906ec06253e4a7af9037728174/doc/panama_memaccess.md</a></p>
          <p>In short, you always need to provide a layout constant of
            the right kind when doing allocation using an allocator (and
            also when doing dereference).</p>
          <p>Value layout constants are provided in the ValueLayout
            class (e.g. ValueLayout.JAVA_DOUBLE).</p>
          <p>If you use jextract, additional constants (e.g. C_INT,
            C_LONG, ...) will be provided.<br>
          </p>
          <div class="moz-cite-prefix">On 23/12/2022 16: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>
            <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>Apple M1 is mostly supported on JDK 19 - modulo few corner
            cases which have been addressed in Java 20.</p>
          <p>Maurizio<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>