Skip to main content
added 42 characters in body; edited title
Source Link
Nimesh Neema
  • 52.9k
  • 25
  • 151
  • 212

My Java .jar Unable to execute JAR file will not launch from finder

I wrote a small Java desktop application using NetBeans, Java 8 and JavaFX 8 on my macBook underMacBook running macOS High Sierra. II can launch it in terminal manuallyfrom Terminal by usingexecuting a bashBash script (mentioned below), but double clicking on the JarJAR in finderFinder fails (right clicking and selecting openOpen fails, too)and and I receive a suggestion that I look for errors in Console, whatever that is.app, but get no other clue as to what's failing. It'sIt's a very specialized app that I'll probably only distribute to a couple of co-workers who don't work in terminalTerminal.

Google search has given me solutions that are out of date, the Oracle solution (out of date) provided a link that proved useless.

What do I need to do to be able make the JarJAR file executable from Finder? How can I get more information on what's wrong? Since it's not signed it might be that Gatekeeper is the culprit.

Edit as requested

My script is in ~/bin~/bin which is included in PATH I. I have a folder, ~/jars~/jars for javaJava apps, each of which has its own folder. In that folder I have copied my project-> ... dist app.jar and my libs folder that has external jar libraries. TheThe script is executablehas execute permissions. Here is the script:

#!/bin/bash
java -jar $HOME/jars/myApp/myApp.

I can launch the app from terminalTerminal or from finderFinder but the first time finder will think I want to edit it so I must choose "Other"Other and then choose "terminal"Terminal. BTW it works exactly the same in Ubuntu, I just copied the script, dropped it into ~/bin~/bin, and dropped the myAppmyApp folder in ~/jars~/jars. It mostly ran but the JRE on the Ubuntu machine, while Java 8, is a little older version than the one on my macMac and I get a run time error after a while. I think that updating to the same version will solve the problem as I don't know how to force NetBeans to include the JRE.

My Java .jar file will not launch from finder

I wrote a small Java desktop application using NetBeans, Java 8 and JavaFX 8 on my macBook under High Sierra. I can launch it in terminal manually by using a bash script but double clicking on the Jar in finder fails (right clicking and selecting open fails, too)and I receive a suggestion that I look for errors in Console, whatever that is, but get no other clue as to what's failing. It's a very specialized app that I'll probably only distribute to a couple of co-workers who don't work in terminal.

Google has given me solutions that are out of date, the Oracle solution (out of date) provided a link that proved useless.

What do I need to do to be able make the Jar file executable from Finder? How can I get more information on what's wrong? Since it's not signed it might be that Gatekeeper is the culprit.

Edit as requested

My script is in ~/bin which is included in PATH I have a folder, ~/jars for java apps each of which has its own folder. In that folder I have copied my project-> ... dist app.jar and my libs folder that has external jar libraries. The script is executable.

#!/bin/bash
java -jar $HOME/jars/myApp/myApp.

I can launch the app from terminal or from finder but the first time finder will think I want to edit it so I must choose "Other" and then choose "terminal". BTW it works exactly the same in Ubuntu, I just copied the script, dropped it into ~/bin, and dropped the myApp folder in ~/jars. It mostly ran but the JRE on the Ubuntu machine, while Java 8, is a little older version than the one on my mac and I get a run time error after a while. I think that updating to the same version will solve the problem as I don't know how to force NetBeans to include the JRE.

Unable to execute JAR file

I wrote a small Java desktop application using NetBeans, Java 8 and JavaFX 8 on my MacBook running macOS High Sierra. I can launch it from Terminal by executing a Bash script (mentioned below), but double clicking on the JAR in Finder fails (right clicking and selecting Open fails too) and I receive a suggestion that I look for errors in Console.app, but get no other clue as to what's failing. It's a very specialized app that I'll probably only distribute to a couple of co-workers who don't work in Terminal.

Google search has given me solutions that are out of date, the Oracle solution (out of date) provided a link that proved useless.

What do I need to do to be able make the JAR file executable from Finder? How can I get more information on what's wrong? Since it's not signed it might be that Gatekeeper is the culprit.

My script is in ~/bin which is included in PATH. I have a folder, ~/jars for Java apps, each of which has its own folder. In that folder I have copied my project-> ... dist app.jar and my libs folder that has external jar libraries. The script has execute permissions. Here is the script:

#!/bin/bash
java -jar $HOME/jars/myApp/myApp.

I can launch the app from Terminal or from Finder but the first time finder will think I want to edit it so I must choose Other and then choose Terminal. BTW it works exactly the same in Ubuntu, I just copied the script, dropped it into ~/bin, and dropped the myApp folder in ~/jars. It mostly ran but the JRE on the Ubuntu machine, while Java 8, is a little older version than the one on my Mac and I get a run time error after a while. I think that updating to the same version will solve the problem as I don't know how to force NetBeans to include the JRE.

added 909 characters in body
Source Link

I wrote a small Java desktop application using NetBeans, Java 8 and JavaFX 8 on my macBook under High Sierra. I can launch it in terminal manually by using a bash script but double clicking on the Jar in finder fails (right clicking and selecting open fails, too)and I receive a suggestion that I look for errors in Console, whatever that is, but get no other clue as to what's failing. It's a very specialized app that I'll probably only distribute to a couple of co-workers who don't work in terminal.

Google has given me solutions that are out of date, the Oracle solution (out of date) provided a link that proved useless.

What do I need to do to be able make the Jar file executable from Finder? How can I get more information on what's wrong? Since it's not signed it might be that Gatekeeper is the culprit.

Edit as requested

My script is in ~/bin which is included in PATH I have a folder, ~/jars for java apps each of which has its own folder. In that folder I have copied my project-> ... dist app.jar and my libs folder that has external jar libraries. The script is executable.

#!/bin/bash
java -jar $HOME/jars/myApp/myApp.

I can launch the app from terminal or from finder but the first time finder will think I want to edit it so I must choose "Other" and then choose "terminal". BTW it works exactly the same in Ubuntu, I just copied the script, dropped it into ~/bin, and dropped the myApp folder in ~/jars. It mostly ran but the JRE on the Ubuntu machine, while Java 8, is a little older version than the one on my mac and I get a run time error after a while. I think that updating to the same version will solve the problem as I don't know how to force NetBeans to include the JRE.

I wrote a small Java desktop application using NetBeans, Java 8 and JavaFX 8 on my macBook under High Sierra. I can launch it in terminal manually by using a bash script but double clicking on the Jar in finder fails (right clicking and selecting open fails, too)and I receive a suggestion that I look for errors in Console, whatever that is, but get no other clue as to what's failing. It's a very specialized app that I'll probably only distribute to a couple of co-workers who don't work in terminal.

Google has given me solutions that are out of date, the Oracle solution (out of date) provided a link that proved useless.

What do I need to do to be able make the Jar file executable from Finder? How can I get more information on what's wrong? Since it's not signed it might be that Gatekeeper is the culprit.

I wrote a small Java desktop application using NetBeans, Java 8 and JavaFX 8 on my macBook under High Sierra. I can launch it in terminal manually by using a bash script but double clicking on the Jar in finder fails (right clicking and selecting open fails, too)and I receive a suggestion that I look for errors in Console, whatever that is, but get no other clue as to what's failing. It's a very specialized app that I'll probably only distribute to a couple of co-workers who don't work in terminal.

Google has given me solutions that are out of date, the Oracle solution (out of date) provided a link that proved useless.

What do I need to do to be able make the Jar file executable from Finder? How can I get more information on what's wrong? Since it's not signed it might be that Gatekeeper is the culprit.

Edit as requested

My script is in ~/bin which is included in PATH I have a folder, ~/jars for java apps each of which has its own folder. In that folder I have copied my project-> ... dist app.jar and my libs folder that has external jar libraries. The script is executable.

#!/bin/bash
java -jar $HOME/jars/myApp/myApp.

I can launch the app from terminal or from finder but the first time finder will think I want to edit it so I must choose "Other" and then choose "terminal". BTW it works exactly the same in Ubuntu, I just copied the script, dropped it into ~/bin, and dropped the myApp folder in ~/jars. It mostly ran but the JRE on the Ubuntu machine, while Java 8, is a little older version than the one on my mac and I get a run time error after a while. I think that updating to the same version will solve the problem as I don't know how to force NetBeans to include the JRE.

added 46 characters in body
Source Link

I wrote a small Java desktop application using NetBeans, Java 8 and JavaFX 8 on my macBook under High Sierra. I can launch it in terminal manually by using a bash script but double clicking on the Jar in finder fails (right clicking and selecting open fails, too)and I receive a suggestion that I look for errors in Console, whatever that is, but get no other clue as to what's failing. It's a very specialized app that I'll probably only distribute to a couple of co-workers who don't work in terminal.

Google has given me solutions that are out of date, the Oracle solution (out of date) provided a link that proved useless.

What do I need to do to be able make the Jar file executable from Finder? How can I get more information on what's wrong? Since it's not signed it might be that Gatekeeper is the culprit.

I wrote a small Java desktop application using NetBeans, Java 8 and JavaFX 8 on my macBook under High Sierra. I can launch it in terminal manually by using a bash script but double clicking on the Jar in finder fails and I receive a suggestion that I look for errors in Console, whatever that is, but get no other clue as to what's failing. It's a very specialized app that I'll probably only distribute to a couple of co-workers who don't work in terminal.

Google has given me solutions that are out of date, the Oracle solution (out of date) provided a link that proved useless.

What do I need to do to be able make the Jar file executable from Finder? How can I get more information on what's wrong? Since it's not signed it might be that Gatekeeper is the culprit.

I wrote a small Java desktop application using NetBeans, Java 8 and JavaFX 8 on my macBook under High Sierra. I can launch it in terminal manually by using a bash script but double clicking on the Jar in finder fails (right clicking and selecting open fails, too)and I receive a suggestion that I look for errors in Console, whatever that is, but get no other clue as to what's failing. It's a very specialized app that I'll probably only distribute to a couple of co-workers who don't work in terminal.

Google has given me solutions that are out of date, the Oracle solution (out of date) provided a link that proved useless.

What do I need to do to be able make the Jar file executable from Finder? How can I get more information on what's wrong? Since it's not signed it might be that Gatekeeper is the culprit.

Fixed grammer
Source Link
Loading
Source Link
Loading