init commit

This commit is contained in:
Chipperfluff 2025-09-12 07:47:14 +02:00
commit 0e5e66bef8
3 changed files with 23 additions and 0 deletions

2
.gitignore vendored Normal file
View File

@ -0,0 +1,2 @@
build/
*.class

5
Main.java Normal file
View File

@ -0,0 +1,5 @@
public class Main {
public static void main(String[] args) {
System.out.println("Hello, World!");
}
}

16
run.sh Executable file
View File

@ -0,0 +1,16 @@
if ! command -v javac >/dev/null 2>&1; then
echo "Error: javac is not installed."
exit 1
fi
if ! command -v java >/dev/null 2>&1; then
echo "Error: java is not installed."
exit 1
fi
if ! javac -d build Main.java; then
echo "Error: javac failed to compile Main.java."
exit 1
fi
java -cp build Main