Point JAVA_HOME to 1.5 latest build, and execute the following commands:
$JAVA_HOME/bin/javac -d . tstc.java
$JAVA_HOME/bin/javac -d . tsts.java
"$JAVA" $JAVA_FLAGS -Xfuture test.tstc
rm -rf test/*.class
$JAVA_HOME/bin/javac -target 1.2 -d . tstc.java
$JAVA_HOME/bin/javac -target 1.2 -d . tsts.java
"$JAVA" $JAVA_FLAGS -Xfuture test.tstc
The the following exception shown:
javac: source release 1.4 requires target release 1.4
javac: source release 1.4 requires target release 1.4
Exception in thread "main" java.lang.NoClassDefFoundError: test/tstc
With previous version of jdk, this test passes.
|