<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:23297db4@protonmail.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/">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">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 <jorn.vernee@oracle.com> 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">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>