Pointer/Scope API questions
Ty Young
youngty1997 at gmail.com
Wed Jan 8 11:38:47 UTC 2020
On 1/8/20 5:09 AM, sundararajan.athijegannathan at oracle.com wrote:
> [...]
>>>>
>>> Are you also adding `--add-modules
>>> jdk.incubator.foreign,jdk.incubator.jextract` when running? I was
>>> seeing a similar error when I forgot to do that.
>>
>>
>> Ah, no. Works now.
>>
>>
>> Is it supposed to throw an exception there though? The modules are
>> apart of the JDK and preview features are enabled so I don't
>> understand why the extra step of adding the modules at runtime is
>> being required here. Is it a bug?
>
> No. It is not a bug. You've to explicitly add "incubator" modules for
> compilation as well as for runtime.
TIL.
Just noticed though that while the Memory Access API works, the jextract
API fails because of javax.tools's JaveFileObject from the java.compiler
module.
My compiler/runtime --add-modules argument looks like:
--add-modules jdk.incubator.foreign,jdk.incubator.jextract,java.compiler
It is also required in module-info.java. Am I missing something here?
>
> -Sundar
>
More information about the panama-dev
mailing list