3

I have a Fedora 29 i386 virtual machine with two versions of java installed:

java-11-openjdk.i386 (/usr/lib/jvm/java-11-openjdk-11.0.ea.28-2.fc29.i386/bin/java)

java-1.8.0-openjdk.i386 (/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.201.b09-6.fc29.i386/jre/bin/java)

when I run my java swing application with openjdk 8 the application works fine, while with openjdk 11 an exception is thrown:

Exception in thread "main" java.lang.UnsatisfiedLinkError: Can't load library: /usr/lib/jvm/java-11-openjdk-11.0.ea.28-2.fc29.i386/lib/libawt_xawt.so
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2620)
    at java.base/java.lang.Runtime.load0(Runtime.java:767)
    at java.base/java.lang.System.load(System.java:1831)
    at java.base/java.lang.ClassLoader$NativeLibrary.load0(Native Method)
    at java.base/java.lang.ClassLoader$NativeLibrary.load(ClassLoader.java:2430)
    at java.base/java.lang.ClassLoader$NativeLibrary.loadLibrary(ClassLoader.java:2487)
    at java.base/java.lang.ClassLoader.loadLibrary0(ClassLoader.java:2684)
    at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2638)
    at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:829)
    at java.base/java.lang.System.loadLibrary(System.java:1867)
    at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1399)
    at java.desktop/java.awt.Toolkit$3.run(Toolkit.java:1397)
    at java.base/java.security.AccessController.doPrivileged(Native Method)
    at java.desktop/java.awt.Toolkit.loadLibraries(Toolkit.java:1396)
    at java.desktop/java.awt.Toolkit.<clinit>(Toolkit.java:1429)
    at java.desktop/java.awt.Component.<clinit>(Component.java:621)

in the new versions of java there is no backward compatibility?

Thomas
  • 87,414
  • 12
  • 119
  • 157
Davide Sestili
  • 101
  • 2
  • 9
  • 1
    Seems like a classpath issue. What's the content of your's CLASSPATH variable ? – SebVb Jun 06 '19 at 13:18
  • 1
    I'd say that's not a matter of backward compatibility but could be a broken installation or a configuration issue (due to the new module system). Is that native library present on your machine and is it accessible to the user that runs the JVM? – Thomas Jun 06 '19 at 13:20
  • The native library is not present so is it a broken installation? OpenJDK 11 was already present at the end of the operating system installation. – Davide Sestili Jun 06 '19 at 13:53

0 Answers0