0

Whenever I need to open the logisim-evolution.jar file, I need to type the command:

java -jar logisim-evolution.jar

I would like to add an entry for that program in /bin to be able to open it through the dmenu. How can I do that?

Aulis Ronkainen
  • 164
  • 2
  • 4
  • 12
  • 3
    You're better off making a .sh launcher that runs `java -jar logisim-evolution.jar` and put it in `/bin` – Federico klez Culloca Sep 19 '20 at 12:27
  • 1
    This _can_ be done using `binfmt_misc` (telling the Linux kernel how to recognize a jar as an executable, and spawn the JVM as an interpreter for it, so you can just drop your jar in `/usr/bin` and `chmod +x` it), but as a system-administration task rather than a development one, that's not on-topic here. Consider [unix.se]. – Charles Duffy Sep 20 '20 at 23:52

1 Answers1

0

You're better off making a .sh launcher that runs java -jar logisim-evolution.jar and put it in /bin

@Federico klez Culloca

  • 1
    Mind, ".sh launcher" is misleading -- executables shouldn't have file extensions. The `#!/bin/sh` as the first line is what identifies something as a sh script, not its filename; and as you don't see folks run `pip.py` or `rbenv.rb`, you shouldn't run `myscript.sh` either. – Charles Duffy Sep 20 '20 at 23:54