Files
java-core-examples/copying/scripts/broken.sh
T

10 lines
371 B
Bash
Executable File

#!/usr/bin/env bash
# Compiles the deliberately broken source and captures the compiler's own message.
cd "$(dirname "$0")/.."
OUT=$(mktemp -d)
{
echo '$ javac src/broken/FinalFieldClone.java'
javac -d "$OUT" src/broken/FinalFieldClone.java 2>&1 | grep -v '^Picked up JAVA_TOOL_OPTIONS' || true
} > output/02-final-field-clone.txt
cat output/02-final-field-clone.txt