KJW
KJW

Reputation: 15251

How to write the following windows batch script in mac and linux counterparts?

I am trying to launch a Java application using the JRE in the same folder.

The windows batch script was as :

"jre\bin\javaw.exe" -jar "main.jar";

How would you create a similar double clickable bash script that works on Mac and Linux?

Upvotes: 2

Views: 1107

Answers (1)

Blender
Blender

Reputation: 298096

It shouldn't be too different:

#!/bin/bash

jre/bin/javaw -jar main.jar

But most Linux distributions do not allow you to run scripts via double click. You have to open them via Terminal:

blender ~ $ bash ./script.sh

Upvotes: 1

Related Questions