Extension Advice: Classes that should be initialized at run time got initialized during image building

14 views
Skip to first unread message

Melloware

unread,
Feb 18, 2023, 3:05:39 PM2/18/23
to Quarkus Development mailing list
OK I think this is my last issue.

I have a few classes like "ImageCropperRenderer" that use "java.awt.Color" and "javax.ImageIO" to manipulate PNG files. However I am getting this issue.

"Classes that should be initialized at run time got initialized during image building:
 java.awt.Toolkit the class was requested to be initialized at run time (from feature io.quarkus.awt.runtime.graal.AwtFeature.afterRegistration with 'java.awt'). To see why java.awt.Toolkit got initialized use --trace-class-initialization=java.awt.Toolkit"

so if I try and initialize "ImageCropperRenderer" at Runtime so its in line with Quarkus AWT initialization I then get a similar error about "ImageCropperRenderer" being initialized at runtime but was initialized during building.

Any Advice on this would be greatly appreciated I think it is my very last issue.

Mello

Melloware

unread,
Feb 18, 2023, 4:09:19 PM2/18/23
to Quarkus Development mailing list
Nevermind found the issue.  Was using Barcode4J library which has a bunch of AWT stuff but was able to register it successfully!
Reply all
Reply to author
Forward
0 new messages