Cannot launch java applications.

Hello, I have been using Linux for a while but I am new to opensuse. I have installed jre-8u60-linux-x64.rpm from the oracle website. I am trying to launch minecraft. If I run java -jar minecraft.jar in the konsole it works fine, however, if I try to launch it by clicking on the .jar file java starts to launch and the closes before it can start minecraft. I have made sure the jar is marked executable and I have tested other .jar files with the same effect. How would I go about fixing this so that I can make a panel launcher for minecraft. Thanks for your time.

in kde go to config center-> file association
find jar and set java -jar as the preferred application
also check update-alternatives as oracle’s jre is a bit flaky you might be using openjdk

Thanks that fixed it.