This question already has an answer here:
I have an .sh file that looks like
#!bin/bash exec /usr/lib/jvm/java-7-openjdk-amd64/jre/bin/ java java -jar /home/me/myfolder/my.jar
I've made this file executable and it works fine when in the "nautilus" desktop, but when I run it on just normal desktop (Ubuntu 14.04) it only opens with gedit. I have also tried opening it with Java 7 and Java 6, but it does not give me the option to run in terminal. Also when i'm in the terminal and cd to the folder containing the .jar file and run it that also works fine. What I'm looking for is a way to just double click my .sh file without having to go to nautilus first. Is this possible?
Sorry if this is a duplicate, but I cant find the answer I'm looking for.