Skip to content

Commit 4bdab42

Browse files
committed
Update run.sh
1 parent 6648205 commit 4bdab42

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

linux/run.sh

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
# along with CustomLauncherRewrite. If not, see <https://www.gnu.org/licenses/>.
1717
#
1818

19-
output=$(find /opt/CustomLauncherRewrite/ -name CustomLauncherRewrite*.jar -exec java "-jar" {} \;)
20-
21-
case "java.lang.UnsupportedClassVersionError" in
22-
*$output*)
19+
# Check if Java is installed and the version is at least 17
20+
if java -version 2>&1 | grep -q "version \"17"; then
21+
latest=$(ls -t CustomLauncherRewrite-*.jar | head -n1)
22+
java -jar $latest
23+
else
2324
notify-send -i stop "Please update Java JRE to version 17 or higher!"
24-
;;
25-
esac
25+
fi

0 commit comments

Comments
 (0)