简体   繁体   中英

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?

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".

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM