THRIFT-450. java: Respect the global classpath during testing

I'm not sure why, but "ant test" under lib/java doesn't pass the
global classpath to the test programs.  (This is weird because
compile-test does.)  This change manually extracts the CLASSPATH
environment variable and adds it to the test classpath.

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@777677 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/lib/java/build.xml b/lib/java/build.xml
index 90a8eaf..fc81f8a 100644
--- a/lib/java/build.xml
+++ b/lib/java/build.xml
@@ -22,6 +22,8 @@
 
   <description>Thrift Build File</description>
 
+  <property environment="env" />
+
   <property name="gen" location="gen-java" />
   <property name="genbean" location="gen-javabean" />
 
@@ -51,6 +53,7 @@
 
   <path id="test.classpath">
     <path refid="compile.classpath" />
+    <pathelement path="${env.CLASSPATH}" />
     <pathelement location="build/test" />
     <pathelement location="libthrift.jar" />
   </path>