# my graalvm version
export GRAALVM_HOME=/home/mxh/software/graalvm-jdk-21.0.3+7.1
export JAVA_HOME=/home/mxh/software/graalvm-jdk-21.0.3+7.1
export PATH=$JAVA_HOME/bin:$PATH
export GRAALVM_HOME
# my os version
Operating System: UOS Desktop 20 Professional
Kernel: Linux 6.1.32-amd64-desktop-hwe
Architecture: x86-64
- run by java -jar
java -agentlib:native-image-agent=config-output-dir=config -Djdk.gtk.version=2 -jar lessions.jar
enter image description here
- run by native-image
native-image --no-fallback -H:+AddAllCharsets -H:ConfigurationFileDirectories=config --enable-url-protocols=https,http -Djava.awt.headless=false --allow-incomplete-classpath -J-Xmx16G -Djdk.gtk.version=2 -jar lessions.jar
./lessions
enter image description here
The program cannot recognize other input methods.
I have added – Djdk. gtk. version=2 to the native-image parameter, but it seems to have no effect.
I hope to input Chinese in the swing program of Graalvm Native.
New contributor
刘梦丹 is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.