0

I am using gluonfx-maven-plugin 1.0.19 with graalvm-ce-java17-22.3.3 for windows 11. This can be checked from the log below.

>mvn clean gluonfx:build

    [1/7] Initializing...
    Version info: 'GraalVM 22.3.3 Java 17 CE
    Java version info: '17.0.8+7-jvmci-22.3-b22
    C compiler: cl.exe (microsoft, x64, 19.29.30151)
    Garbage collector: Serial GC
    1 user-specific feature(s)

There is also an unpleasant line in the log

The bundle named: com.ibm.icu.impl.data.icudt65b.ru, has not been found. If the bundle is part of a module, verify the bundle name is a fully qualified class name. Otherwise verify the bundle path is accessible in the classpath.

The exucateble * .exe file is built. I run it and get exception Could not find the bundle com/ibm/icu/impl/data/icudt65b/ru_RU/ Library de.gsi.chart.chartfx-chart throws it.

The library de.gsi.chart.chartfx-chart tries to read the file ru_RU. The library is present in class path and containts file ru_RU. See the screenshot

I added bundlesList to pom.xml. Also you can see module-info.java

Problem 1 Gluonfx plagin can not read bundle com.ibm.icu.impl.data.icudt65b.ru , not com.ibm.icu.impl.data.icudt65b.ru_RU.

Problem 2 Let's try read bundle `com/ibm/icu/impl/data/icudt65b/ru.res. Add a bundle

<bundlesList>
 <list>com/ibm/icu/impl/data/icudt65b/ru.res</list>
</bundlesList>

or creat the file src/main/resources/META-INF/substrate/config/resourcebundles

com/ibm/icu/impl/data/icudt65b/ru.res
Plugin read bundle name correctly but does not find it.

The bundle named: com/ibm/icu/impl/data/icudt65b/ru.res, has not been found. If the bundle is part of a module, verify the bundle name is a fully qualified class name. Otherwise verify the bundle path is accessible in the classpath.

Please help me. Peace for everyone!

Martin
  • 35
  • 5
  • 1
    Have you tried `mvn gluonfx:runagent` before doing the build? That should find the used resources and add them properly to the native image. – José Pereda Aug 04 '23 at 23:14
  • Hmm... I'm doing `mvn gluonfx:runagent`. My program starts correctly and works correctly, then I click on the close button (the cross in the upper right corner), the program closes, but the maven process hangs (the console is locked). I have not overridden the handler of the close command in my code. – Martin Aug 05 '23 at 00:18
  • But did it generate the config files under `src/main/resources/META-INF/native-image`? – José Pereda Aug 05 '23 at 09:46
  • José Pered, ¡Gracias! Everything worked, below I left a detailed comment – Martin Aug 05 '23 at 19:06
  • @JoséPereda Сan you tell me one more [question](https://stackoverflow.com/questions/76847580/gluonhq-with-hibernate-could-not-resolve-net-bytebuddy-utility-invokerdispatch) ? – Martin Aug 07 '23 at 08:52

1 Answers1

0

José Pereda, ¡Gracias!

I added code

stage.setOnCloseRequest(handler -> {
  Platform.exit();
  System.exit(0);
});

Then

mvn gluonfx:runagent

My app started correctly, I clicked the close button (the cross in the upper right corner), it closed and agent process finished. Then I did

mvn gluonfx:build

The app is built and started correctly!

Tyler2P
  • 2,324
  • 26
  • 22
  • 31
Martin
  • 35
  • 5