Community
Participate
Working Groups
When I try to use the SWT_AWT bridge with OpenJDK 13 and Eclipse 2019-09 R (4.13.0) I run into a java.lang.UnsatisfieldLinkError. On Windows 10 everything runs fine. The error occurs on Ubuntu 19.04 and maybee on MacOSX 10.14.6 (here I got no error message but the SWT_AWT panels are not painted, etc.) With OpenJDK 12 everything runs fine. It seems that the native libraries for Linux and Mac can't be found The error can be reproduced, e.g., with the following example (source from: http://www.java2s.com/Tutorial/Java/0280__SWT/EmbededSwingAWTcomponentstoSWT.htm): import javax.swing.JScrollPane; import javax.swing.JTree; import org.eclipse.swt.SWT; import org.eclipse.swt.awt.SWT_AWT; import org.eclipse.swt.widgets.Composite; import org.eclipse.swt.widgets.Display; import org.eclipse.swt.widgets.Shell; public class EmbedSwingAWTSWT { public static void main(String[] args) { final Display display = new Display(); final Shell shell = new Shell(display); shell.setText("SWT and Swing/AWT Example"); Composite treeComp = new Composite(shell, SWT.EMBEDDED); treeComp.setBounds(5,5,300,300); java.awt.Frame fileTableFrame = SWT_AWT.new_Frame(treeComp); java.awt.Panel panel = new java.awt.Panel(new java.awt.BorderLayout()); fileTableFrame.add(panel); JTree fileTable = new JTree(); fileTable.setDoubleBuffered(true); JScrollPane scrollPane = new JScrollPane(fileTable); panel.add(scrollPane); shell.open(); while (!shell.isDisposed()) { if (!display.readAndDispatch()) display.sleep(); } display.dispose(); } }
Does it work if you run the snippet from the command line (i.e. not in Eclipse)?
I exported the example as a runnable jar from Eclipse and from the command line executed: ./java -jar SWT_AWT.jar With OpenJDK 13 I can reproduce the exact same error. Once again with OpenJDK 11/12 everything runs fine. I also read the release notes of Openjdk 13. However was not able to identify breaking changes: https://jdk.java.net/13/release-notes Only the removal of awt.toolkit System Property looks suspicious.
Any news about this bug?