Open jgautheron opened 3 years ago
Renderer classes in Lanterna are usually not "hardreferenced", but dynamically loaded. This is, because it is in principle also allowed to add custom renderers to standard widgets.
Either you have to tell GraalVM to also include the *Renderer classes, or Lanterna would need to hard-ref the default-renderers while still keeping a way to override them.
I'm not sure how often "replacing renderers" is really used, because my (bubble-)memory seems to recall some cases where renderers needed access to non-public state of widgets, making it pretty hard to replace them with custom classes in other packages in practice...
We could add a synthetic hard-reference to the renderers that comes with lanterna. I'm assuming it's enough to just have them imported and referenced, even if the code does nothing?
@jgautheron see if you can compile release/3.0
from source and see if the commit above fixes the issue?
@mabe02 Thanks for that! I'm using gradle and it won't let me reference a maven source project. Could you maybe create a patch version?
What if you clone it locally and rebuild it? Surely gradle will let you use local repo maven artifacts.
When compiling natively my project with GraalVM 20.2.0 CE, I get the following error:
I'm trying to compile this example: https://github.com/mabe02/lanterna/blob/master/docs/examples/gui/hello_world.md with a small change (replaced
createTerminal
bycreateHeadlessTerminal
). If I remove the button it works fine.Version: 3.1.0-beta2