sudo add-apt-repository ppa:webupd8team/java
sudo apt-get update
sudo apt-get install oracle-java8-installer
If the above does not work, you can try opening through the Terminal
cd (File Location)
java -jar FileName.jar
It's good to note that usally an error can be fixed with a restart or simply reinstalling Java.
If you are stumped or something didn't work, try asking the Discord here.