Had the same problem.
Tested SQL Developer 19.1, 18.4, and 18.2 with jdk-8u202 and jdk-8u211, getting the same error: The program 'java' received an X Window System error. ...
Installed "Server with GUI":
yum groupinstall "Server with GUI"
And reboot the machine. Also deleted .sqldeveloper folder under ~ (DO NOT DELETE this folder if you have worked in SQL Developer before on this machine. In may case this is a new installation, on a new development machine and this folder is empty). Now it works.
Hope this helps.
I would be carefull to remove the whole $HOME/.sqldeveloper. At least in my case I was storing SQL scripts etc. to this folder beginning several SQLDeveloper versions & years ago.
May be that was wrong, but other people may have done the same.
Instead of removing whole folder .sqldeveloper, one could remove just the folder of the sqldeloper release: something like $HOME/.sqldeveloper/19.1.
I have the same problem.
renaming the 19.1 user settings folder under ~/.sqldeveloper helps, but I actually need to do it every time I start the sqldeveloper.