This repository has been archived on 2024-10-22. You can view files and clone it, but cannot push or open issues or pull requests.
sp-03/test-input/compile-example.sh
github-classroom[bot] 61202b8db3
Initial commit
2023-10-09 07:08:58 +00:00

16 lines
521 B
Bash
Executable file

#!/usr/bin/env bash
# Compile the given Java file for the different versions of Java
# E.g., if you use the ASM Viewer plugin for IntelliJ IDEA,
# that plugin can't deal with Java 10.
# It can read Java class files for older versions of Java, though.
# So, here we compile it for all versions of Java supported by the Java 10 javac compiler.
CLASS=$1
VERSIONS=( 6 7 8 9 10 )
for VERSION in "${VERSIONS[@]}"
do
echo Version $VERSION
mkdir -p java$VERSION
javac -d java$VERSION --release $VERSION $CLASS
done