Graal: no awt in java.library.path

Created on 28 Jul 2020  路  1Comment  路  Source: oracle/graal

Describe the issue
I use grailvm-dev20.3.0 native image, a java program that uses swing. Native image has been successful, but it throws an exception no AWT in java.library.path when running the .exe file, I've tried awt.dll Put it in the directory or the dynamic library directory of the system, but this error is still reported.

Steps to reproduce the issue
Please include both build steps as well as run steps

  1. git clone https://github.com/albert-flex/albertgame-treasure
  2. mvn clean package
  3. mvn client:build
  4. Run the albertgame-treasure.exe in target/client/x86_64-windows

Describe GraalVM and your environment:

  • GraalVM version graalvm-ce-java11-20.3.0-dev
  • JDK major version: 11
  • OS: Windows 10
  • Architecture: AMD64

More details

Exception in thread "main" java.lang.UnsatisfiedLinkError: no awt in java.library.path
        at com.oracle.svm.core.jdk.NativeLibrarySupport.loadLibrary(NativeLibrarySupport.java:131)
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:228)
        at java.lang.Runtime.loadLibrary0(Runtime.java:830)
        at java.lang.Runtime.loadLibrary(Runtime.java:238)
        at java.lang.System.loadLibrary(System.java:352)
        at java.awt.Toolkit$3.run(Toolkit.java:1395)
        at java.awt.Toolkit$3.run(Toolkit.java:1393)
        at java.security.AccessController.doPrivileged(AccessController.java:83)
        at java.awt.Toolkit.loadLibraries(Toolkit.java:1392)
        at java.awt.Toolkit.<clinit>(Toolkit.java:1425)
        at com.oracle.svm.core.classinitialization.ClassInitializationInfo.invokeClassInitializer(ClassInitializationInfo.java:351)
        at com.oracle.svm.core.classinitialization.ClassInitializationInfo.initialize(ClassInitializationInfo.java:271)
        at albertgame.afengine.in.core.graphics.GraphicsTech_Java2DImpl.<init>(GraphicsTech_Java2DImpl.java:94)
        at albertgame.afengine.core.app.WindowApp.<init>(WindowApp.java:49)
        at albertgame.treasure.Treasure.main(Treasure.java:45)

I've just used the graalvm-ce-java11 as my java_home.this project just use the dom4j library and jdk libraries.
The Code At albertgame.afengine.in.core.graphics.GraphicsTech_Java2DImpl.(GraphicsTech_Java2DImpl.java:94) is following:
Toolkit kit = Toolkit.getDefaultToolkit();

bug native-image

Most helpful comment

I got that awt is not support yet.
However, I do really need it.

>All comments

I got that awt is not support yet.
However, I do really need it.

Was this page helpful?
0 / 5 - 0 ratings