Finished part 1 of the Wayland McWayface tutorial of Drew DeVault - Issue with spi toolprovider interface and jextract

Sundararajan Athijegannathan sundararajan.athijegannathan at oracle.com
Mon Feb 25 12:46:12 UTC 2019


Yes, because it is static final field (DEBUG) initialized from a System 
property, you need to specify in command line of the app embedding jextract.

Also, please note that the output goes into err PrintStream passed to 
the jextract tool.

-Sundar

On 25/02/19, 5:07 PM, Maurizio Cimadamore wrote:
>
> On 25/02/2019 00:40, Mark Hammons wrote:
>> So at least I know the command is failing, but still no output as to 
>> why. 
>
> Error code 4 means jextract failed with some runtime exception - but 
> the "jextract.debug" option should print the exception message:
>
> ```
> ctx.err.println(re.getMessage());
> if (Main.DEBUG) {
>   re.printStackTrace(ctx.err);
> }
> return RUNTIME_ERROR;
> ```
>
> I'm not sure setting the property the way you do is the right way to 
> go. The property is cached in a static field:
>
> ```
> public static final boolean DEBUG = Boolean.getBoolean("jextract.debug");
> ```
>
> So you are basically depending on the order in which classes are 
> loaded/initialized here. Can you try to pass -Djextract.debug to the 
> VM directly instead of doing it from the program? (not 100% sure that 
> is why you are getting no output, but let's try to remove as many 
> accidental factors as possible).
>
>
> Maurizio
>
>
>


More information about the panama-dev mailing list