{"action":"opened","issue":{"url":"https://api.github.com/repos/jminusminus/jmm/issues/28","repository_url":"https://api.github.com/repos/jminusminus/jmm","labels_url":"https://api.github.com/repos/jminusminus/jmm/issues/28/labels{/name}","comments_url":"https://api.github.com/repos/jminusminus/jmm/issues/28/comments","events_url":"https://api.github.com/repos/jminusminus/jmm/issues/28/events","html_url":"https://github.com/jminusminus/jmm/issues/28","id":144713266,"number":28,"title":"Create self executing Jars","user":{"login":"ricallinson","id":71884,"avatar_url":"https://avatars.githubusercontent.com/u/71884?v=3","gravatar_id":"","url":"https://api.github.com/users/ricallinson","html_url":"https://github.com/ricallinson","followers_url":"https://api.github.com/users/ricallinson/followers","following_url":"https://api.github.com/users/ricallinson/following{/other_user}","gists_url":"https://api.github.com/users/ricallinson/gists{/gist_id}","starred_url":"https://api.github.com/users/ricallinson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ricallinson/subscriptions","organizations_url":"https://api.github.com/users/ricallinson/orgs","repos_url":"https://api.github.com/users/ricallinson/repos","events_url":"https://api.github.com/users/ricallinson/events{/privacy}","received_events_url":"https://api.github.com/users/ricallinson/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-03-30T20:39:10Z","updated_at":"2016-03-30T20:39:10Z","closed_at":null,"body":"Jar files are really zip archives, which will tolerate a comment line at the head of the file.\r\n\r\n$ head -n 1 ~/bin/JarFile\r\n#!/home/y/bin/java -jar\r\n\r\nchmod +x ~/bin/JarFile\r\n\r\nTo execute this trick at home, prefix a command as above (your java location may vary) to the jar file by concatenation, then use chmod to set the executable bit in the file mode, and you're good to go."}}