Kyle
Kyle

Reputation: 3042

mac + linux execute jar file?

Will this work on both linux + mac? I don't have a test computer but from your experiences will this do?

Run jar(mac&linux).sh

#!/bin/sh
java -jar client.jar $*

Upvotes: 1

Views: 1497

Answers (2)

grepit
grepit

Reputation: 22392

You may want to create manifest file (make sure you have the jar files in the location your specifying too) and then you can run: java -jar [your_full_path}/[you_jar_file_name].jar

Upvotes: 1

Ignacio Vazquez-Abrams
Ignacio Vazquez-Abrams

Reputation: 799330

​Y​o​u want "$@", not $*.​ And don't forget to make the script itself executable.

Upvotes: 1

Related Questions