aboutsummaryrefslogtreecommitdiffstats
path: root/ajdoc
diff options
context:
space:
mode:
authorwisberg <wisberg>2005-05-21 21:44:32 +0000
committerwisberg <wisberg>2005-05-21 21:44:32 +0000
commitc9333e38add3e516dd41b4ae808be94521d37ffc (patch)
tree2e9fe8779d0ccd4f2221d35660efb686226b5b71 /ajdoc
parent0b30f3e8c66e530085ff8c94ce658e2f8b4b2fce (diff)
downloadaspectj-c9333e38add3e516dd41b4ae808be94521d37ffc.tar.gz
aspectj-c9333e38add3e516dd41b4ae808be94521d37ffc.zip
expanded test for tools.jar to cases where jar is available but VM can't load the classes
Diffstat (limited to 'ajdoc')
-rw-r--r--ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java10
1 files changed, 8 insertions, 2 deletions
diff --git a/ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java b/ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java
index ce2f028d6..901af2949 100644
--- a/ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java
+++ b/ajdoc/src/org/aspectj/tools/ajdoc/JavadocRunner.java
@@ -17,17 +17,23 @@ package org.aspectj.tools.ajdoc;
import java.lang.reflect.InvocationTargetException;
import java.lang.reflect.Method;
+import org.aspectj.util.LangUtil;
+
/**
* @author Mik Kersten
*/
class JavadocRunner {
static boolean has14ToolsAvailable() {
- Class jdMainClass = com.sun.tools.javadoc.Main.class;
try {
+ Class jdMainClass = com.sun.tools.javadoc.Main.class;
Class[] paramTypes = new Class[] {String[].class};
jdMainClass.getMethod("execute", paramTypes);
- } catch (NoSuchMethodException e) {
+ } catch (NoClassDefFoundError e) {
+ return false;
+ } catch (UnsupportedClassVersionError e) {
+ return false;
+ } catch (NoSuchMethodException e) {
return false;
}
return true;