Community
Participate
Working Groups
Configuration OS: Ubuntu 18.04 Eclipse SDK Version: 2020-03 (4.15) Build id: I20200106-1805 OS: Linux, v.4.15.0-72-generic, x86_64 / gtk 3.22.30, WebKit 2.26.2 Java version: 13.0.1 Running snippet 135 results in the following error Exception in thread "main" org.eclipse.swt.SWTError: Unspecified error [Error while starting AWT] (java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: no swt-awt-gtk-4932r8 in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib] no swt-awt-gtk in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib] Can't load library: /home/sravan/.swt/lib/linux/x86_64/libswt-awt-gtk-4932r8.so Can't load library: /home/sravan/.swt/lib/linux/x86_64/libswt-awt-gtk.so /home/sravan/.swt/lib/linux/x86_64/libswt-awt-gtk-4932r8.so: /home/sravan/JAVA/jdk-13.0.1/lib/libjawt.so: version `SUNWprivate_1.1' not found (required by /home/sravan/.swt/lib/linux/x86_64/libswt-awt-gtk-4932r8.so) ) at org.eclipse.swt.SWT.error(SWT.java:4746) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:166) at org.eclipse.swt.snippets.Snippet135.main(Snippet135.java:155) Caused by: java.lang.UnsatisfiedLinkError: Could not load SWT library. Reasons: no swt-awt-gtk-4932r8 in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib] no swt-awt-gtk in java.library.path: [/usr/java/packages/lib, /usr/lib64, /lib64, /lib, /usr/lib] Can't load library: /home/sravan/.swt/lib/linux/x86_64/libswt-awt-gtk-4932r8.so Can't load library: /home/sravan/.swt/lib/linux/x86_64/libswt-awt-gtk.so /home/sravan/.swt/lib/linux/x86_64/libswt-awt-gtk-4932r8.so: /home/sravan/JAVA/jdk-13.0.1/lib/libjawt.so: version `SUNWprivate_1.1' not found (required by /home/sravan/.swt/lib/linux/x86_64/libswt-awt-gtk-4932r8.so) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:342) at org.eclipse.swt.internal.Library.loadLibrary(Library.java:256) at org.eclipse.swt.awt.SWT_AWT.loadLibrary(SWT_AWT.java:77) at org.eclipse.swt.awt.SWT_AWT.new_Frame(SWT_AWT.java:162) ... 1 more
Not reproducible with Java 11
Hello, this bug is similar to the one that lead me to report bug 558681. I was planning to report it as well as soon as I have more details about it. I previously faced the same problem of 'SUNWprivate_1.1' not found while loading libswt-awt on Linux, with Eclipse 2019-12 and Eclipse 2019-09, openjdk 1.11 and oracle 13. As I said in comment 8 of bug 558681, I don't face this 'SUNWprivate' definition problem anymore ... but I don't know why! I guess it is due to the configuration of Java in Eclipse. I'll tell you if I manage to reproduce this.
Yes, most probably this is related to configuration of java.library.path. I have no problem anymore in Eclipse, but if loading the lib from jshell, then it does not work. Steps to reproduce : 1. open a jshell (command 'jshell' in Linux, available from Java 9). 2. type 'System.loadLibrary("jawt");' 3. type 'System.load("/absolute/path/to/repo/eclipse.platform.swt.binaries/bundles/org.eclipse.swt.gtk.linux.x86_64/libswt-awt-gtk-4932r7.so")' (with the valid lib from the repo, not the corrupted one of bug 558681 !) Step 3 produces an error with oracle 13 jvm, no error with openjdk 11.
Ok last update from tests during the afternoon: - I think it also fails with OpenJDK 11, just the error does not appear at the same time (at native method call for OpenJDK, at library load for Oracle 13). - The error is not related to the configuration of Eclipse, now I can reproduce the bug on all Linux machines of my lab (some were using OpenJDK 8 where there is no problem). - Thus, I am wondering if the error is related to the compilation of the swt libs (instead of the java.library.path). A few related posts: https://docs.oracle.com/cd/E23824_01/html/821-1602/solarisabi-6.html https://bugzilla.redhat.com/show_bug.cgi?id=1590796 https://stackoverflow.com/questions/5790085/linux-library-problem