MisterHazza
MisterHazza

Reputation: 198

How do I convert a .jar file to a Unix executable file? (Mac)

I have created a java project, and I have exported it to my desktop.

Is there a way of converting that .jar file on my desktop, to a Unix executable file?

Upvotes: 1

Views: 579

Answers (1)

Yaroslav Nudnenko
Yaroslav Nudnenko

Reputation: 290

You can create a launch file (shortcut). You need to create a file with text:

#!/bin/sh
java -jar myProject.jar

and make it executable:

chmod + x ./shortcutfile

OR

Right click on jar-file. Select "Open With Other Application" and choose "Runtime Environment".

Upvotes: 1

Related Questions