beryx / badass-runtime-plugin

Create a custom runtime image of your non-modular application
https://badass-runtime-plugin.beryx.org
Apache License 2.0
162 stars 21 forks source link

Runtime image Locale #145

Open NegusSugus opened 1 year ago

NegusSugus commented 1 year ago

I'm creating an image of my javafx application using the plugin. When I execute the bat file to launch my application the locale is not set to Spanish which is the locale of my code. Any idea why is it happening and how can I solve it? Thank you!

hansi-b commented 1 year ago

This sounds similar to a problem I had a while ago. In my case, the jdk.localedata had not been included in the build. I solved it by adding that to the modules list manually:

modules = ['jdk.localedata']
additive = true // add to suggested modules

(See https://stackoverflow.com/a/70009139 for more details, and there is issue #108 open here for this topic.)

danielpeintner commented 1 year ago

I did have a similar issue and in my case I added the languages explicitly (German, Italian, English) ...

runtime {
    options = ['--add-modules', 'java.base,jdk.localedata', '--include-locales', 'de,it,en']
    additive = true
    modules = ['jdk.charsets', 'jdk.crypto.ec']
    ...