B4J Question How to Run/Execute a JAR on MacOS?

Sagenut

Well-Known Member
Licensed User
I am completely out from the Apple/Mac world so excuse me if I will write silly or non exact things.
How to run a JAR, created with B4J, on a Mac?
I tried searching the forum for a solution to this but I came out unsuccessfull.
Take into account that I have only a PC.
Mac will not execute such a JAR directly because it's not signed (or something similar), right?
Somewhere I should have read that is possible to force the execution by Right Click and Allowing that specific JAR.
But on Mac must be installed the JRE.
Is this correct?
If not how can I make Mac users able to run my JAR?
I just need to distribute it between friends so it's not needed a complete solution for Public Publishing.
But I would not regret even such a complete solution. 😁
Thanks
 

aeric

Well-Known Member
Licensed User
You can run terminal in macOS to execute the jar file.
 

Sagenut

Well-Known Member
Licensed User
Could you provide me the full command to achieve this, please?
Is it possible to create a file or something that will make this automatic so that the user can launch the program with just a double click?
 

aeric

Well-Known Member
Licensed User
Could you provide me the full command to achieve this, please?
Is it possible to create a file or something that will make this automatic so that the user can launch the program with just a double click?
Try create a .command file and put the commands to call the jar file.
B4X:
java -jar myb4japp.jar
 

ThRuST

Well-Known Member
Licensed User
On MacOS System preferences/Security & privacy/General tab

Click the lock to make changes.

Under "Allow apps downloaded from" select Anywhere.

That should work. Obviously you will need to have the JRE installed before clicking on the JAR file...
 
Top