GraalVM Production build does not include locales

I was building the project using this command:

mvn -Pproduction -Pnative native:compile

Everything works fine, and the app loads instantly when I run it.

The only problem is that I am using NumberFormatter with locales to format numbers in different languages, but it is not working properly.

I did some research on the web and found out that I have to add the locales manually to the native image build command. I don’t know how to achieve that using the command given in the documentation section of Vaadin native image build. The parameter that I need to add is -H:IncludeLocales=fr,en.

You have to include the locales.

Please read the documentation: Accessing Resources in Native Image

where can i add the parameter that would include the locales?

i have to give this parameter while building the image, but where do i give it as input?

-H:IncludeLocales=fr,en

You’ll find the answer in the documentation. Maven plugin for GraalVM Native Image building

Thank you so much sir. The issue is now resolved :white_check_mark:

1 Like