Revert "JAVA_HOME nad tools.jar not needed for Java testing"

This reverts commit 7373b99079.

Seems to be needed for older jdks - needs some more work, as the
classpath used is not correct for jdk9.
This commit is contained in:
William S Fulton 2018-06-09 00:40:26 +01:00
commit b0a42e38e7
2 changed files with 8 additions and 2 deletions

View file

@ -1714,7 +1714,9 @@ tool, for example:
<p>
Runtime tests in Java are implemented using Javadoc doclets in tools.jar in the JDK.
Runtime tests in Java are implemented using Javadoc doclets. To make that work, you
should have tools.jar from the JDK in your classpath. Or you should have JAVA_HOME
environment variable defined and pointing to the JDK location.
</p>
<p>
The Java's comment parsing code (the testing part) is located in commentParser.java.

View file

@ -6,8 +6,10 @@ LANGUAGE = java
JAVA = @JAVA@
JAVAC = @JAVAC@
JAVAFLAGS = @JAVAFLAGS@
JAVA_CLASSPATH_SEP = @JAVA_CLASSPATH_SEP@
SCRIPTSUFFIX = _runme.java
JAVA_CLASSPATH = .
JAVA_HOME ?= @JAVA_HOME@
srcdir = @srcdir@
top_srcdir = ../@top_srcdir@
@ -108,6 +110,8 @@ CommentParser.class:
echo "Compiling $(srcdir)/CommentParser.java"
$(COMPILETOOL) $(JAVAC) -classpath $(JAVA_CLASSPATH) -d . $(srcdir)/CommentParser.java
JAVA_CLASSPATH := .
$(DOXYGEN_TEST_CASES:=.cpptest): JAVA_CLASSPATH := "$(JAVA_HOME)/lib/tools.jar$(JAVA_CLASSPATH_SEP)."
$(DOXYGEN_TEST_CASES:=.cpptest): CommentParser.class
# Compiles java files then runs the testcase. A testcase is only run if