From b0a42e38e7f92057eb7e693fedc6ff84dc9a7247 Mon Sep 17 00:00:00 2001 From: William S Fulton Date: Sat, 9 Jun 2018 00:40:26 +0100 Subject: [PATCH] Revert "JAVA_HOME nad tools.jar not needed for Java testing" This reverts commit 7373b99079557569202a88a1c3dad8083d2f1113. Seems to be needed for older jdks - needs some more work, as the classpath used is not correct for jdk9. --- Doc/Manual/Doxygen.html | 4 +++- Examples/test-suite/java/Makefile.in | 6 +++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/Doc/Manual/Doxygen.html b/Doc/Manual/Doxygen.html index 3495684c8..1e9bbb977 100644 --- a/Doc/Manual/Doxygen.html +++ b/Doc/Manual/Doxygen.html @@ -1714,7 +1714,9 @@ tool, for example:

-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.

The Java's comment parsing code (the testing part) is located in commentParser.java. diff --git a/Examples/test-suite/java/Makefile.in b/Examples/test-suite/java/Makefile.in index 5af68ec4f..3ce692080 100644 --- a/Examples/test-suite/java/Makefile.in +++ b/Examples/test-suite/java/Makefile.in @@ -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