How can I get this .sh file to run properly?
The problem is that the bat command uses the Windows Path Separator (;
) to specify the classpath. In UNIX systems this is (:
), thus we can change the script to:
#!/bin/sh
java -Xmx815m -cp bin:lib/*: com.rs.Launcher true true false
To get it to stay open, in addition to Marcos Roriz Junior's answer, you can do:
#!/bin/sh
java -Xmx815m -cp bin:lib/*: com.rs.Launcher true true false
read -p 'Press Enter to continue...'
However, it may not open in a terminal window. If you double click the file and select Run in Terminal that will open a terminal, but if you are running it from the command line or with Run it will not.
Use this to always open in a terminal:
#!/bin/bash
[[ ! -t 0 ]] && exec gnome-terminal -e "$0 \"$@\""
java -Xmx815m -cp bin:lib/*: com.rs.Launcher true true false
read -p 'Press Enter to continue...'
NOTE: You may have to cd
to the folder where the files are before the java ...
command.