I have a simple Java program that interacts with the user in the CLI. The program runs fine from a shell script (play.sh), when the shell script is executed from the CLI.
Is there a way to rewrite the play.sh file to be able to run it from the Ubuntu Files via a double-click? I want the file to open a CLI session and then run the Java program from within that session. It would save me a small step if I could just double-click the play.sh file directly instead of first executing "Open In Terminal" and then typing ./play.sh from within a CLI session.
Text of the play.sh follows:
#!/bin/bash
java -p ~/Projects_Java/src/FlashIntervals/compiled/ -m moduleFlashIntervals/seconditeration.CLIPrompter
Yes, the play.sh file properties include "Allow executing file as program". But the double-click appears to do nothing, probably because a CLI session is not opened by the Java program itself. The Java program simply writes to System.out.console, i.e., the CLI from where it was run. And there is nothing in the play.sh file to expose this session to the user.
This is almost certainly a duplicate question but I don't seem to be searching for an answer with the correct keywords, and can't find info on how to do this.