It seems that SWT (eclipse based) applications in Xenial (16.04) are mostly broken with default-jdk (ie openjdk 8). This includes Eclipse IDE, Gantproject, etc...
They either won't load, or won't work as expected (never ending operations, ...). This is related to the fact that SWT integrates badly with GTK3, and especialy the latest version that ships with Xenial (look for SWT GTK3 in Google for tons of problems and blogs related to the issue).
Most of the time, export SWT_GTK3=0
works around the issue (it falls back to GTK2).
So here is my question: what is the best way to handle this problem for Xenial ?
- set
SWT_GTK3=0
globally for the system (then how is it best done,/etc/bash.bashrc
,/etc/environment
, ???) ? - report the problem to Ubuntu to get it solved before the release ? Then, what are the relevant packages ? (default-jdk, swt-gtk, ???) Notice a bug report already exists on the subject: https://bugs.launchpad.net/ubuntu/+source/swt-gtk/+bug/1552764, which I edited to make it more generic and not eclipse IDE only
- any other option ?
The problem has already been reported to Ubuntu at the link you provided, so nothing more needs to be done there just yet.
If
SWT_GTK3=0
works well, you should set it as unglobally as is feasible. There are a few ways to do it (choose the last one that will work for your situation):/etc/environment
applies to everything for every user, not just Java programs/etc/bash.bashrc
applies to things started frombash
for every user, not just Java.~/.bashrc
applies to things started frombash
for the current user, not just Java.bash
for every user using thejava
command. Press Ctrl+Alt+T and run the following:bash
for the current user using thejava
command. Press Ctrl+Alt+T and run the following:I just got
winbuilder designer
to work this morning. I will share.Install oracle jdk8 and remove open jdk. To purge do this command.
To install oracle jdk use the ppa and installer instructions. The complex manual method and ppa method are found here. (And google can help too if needed) Replace openjdk with oracle-jdk on Ubuntu