commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tcu...@apache.org
Subject svn commit: r515365 - /jakarta/commons/sandbox/jci/trunk/compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java
Date Tue, 06 Mar 2007 23:37:48 GMT
Author: tcurdt
Date: Tue Mar  6 15:37:46 2007
New Revision: 515365

URL: http://svn.apache.org/viewvc?view=rev&rev=515365
Log:
fail a test if javac is not in the classpath


Modified:
    jakarta/commons/sandbox/jci/trunk/compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java

Modified: jakarta/commons/sandbox/jci/trunk/compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java
URL: http://svn.apache.org/viewvc/jakarta/commons/sandbox/jci/trunk/compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java?view=diff&rev=515365&r1=515364&r2=515365
==============================================================================
--- jakarta/commons/sandbox/jci/trunk/compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java
(original)
+++ jakarta/commons/sandbox/jci/trunk/compilers/javac/src/test/java/org/apache/commons/jci/compilers/JavacJavaCompilerTestCase.java
Tue Mar  6 15:37:46 2007
@@ -10,4 +10,16 @@
 		return "javac";
 	}
 
+	public void testForToolsJar() {
+		try {
+			Class.forName("com.sun.tools.javac.Main");
+		} catch (ClassNotFoundException e) {
+			final StringBuffer sb = new StringBuffer();
+			sb.append("Could not find javac compiler class (should be in the tools.jar/classes.jar
in your JRE/JDK). ");
+			sb.append("os.name").append('=').append(System.getProperty("os.name")).append(", ");
+			sb.append("os.version").append('=').append(System.getProperty("os.version")).append(",
");
+			sb.append("java.class.path").append('=').append(System.getProperty("java.class.path"));
+			fail(sb.toString());
+		}
+	}
 }



---------------------------------------------------------------------
To unsubscribe, e-mail: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


Mime
View raw message