-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrobocode.sh
More file actions
executable file
·40 lines (34 loc) · 1.17 KB
/
Copy pathrobocode.sh
File metadata and controls
executable file
·40 lines (34 loc) · 1.17 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
#!/bin/sh
#
# Copyright (c) 2001-2025 Mathew A. Nelson and Robocode contributors
# All rights reserved. This program and the accompanying materials
# are made available under the terms of the Eclipse Public License v1.0
# which accompanies this distribution, and is available at
# https://robocode.sourceforge.io/license/epl-v10.html
#
#----------------------------------------------------------
# Run Robocode (UI)
#----------------------------------------------------------
# Used for setting Java options
. ./set_java_options.sh
exit_code=$?
# Save present work directory (pwd)
pwd=$(pwd)
# Change directory to the directory where this script is located
cd "${0%/*}" || exit
if [ "$exit_code" -ne 100 ]; then
# Run Robocode
java \
-cp "libs/*" \
-Xmx512M \
-Xdock:name=Robocode \
-Xdock:icon=robocode.ico \
-XX:+IgnoreUnrecognizedVMOptions \
"--add-opens=java.base/sun.net.www.protocol.jar=ALL-UNNAMED" \
"--add-opens=java.base/java.lang.reflect=ALL-UNNAMED" \
"--add-opens=java.desktop/javax.swing.text=ALL-UNNAMED" \
"--add-opens=java.desktop/sun.awt=ALL-UNNAMED" \
robocode.Robocode "$@"
fi
# Restore present work directory
cd "${pwd}" || exit