THRIFT-890. java: Fix tutorial to build and run in trunk

git-svn-id: https://svn.apache.org/repos/asf/incubator/thrift/trunk@1001856 13f79535-47bb-0310-9956-ffa450edef68
diff --git a/tutorial/java/build.xml b/tutorial/java/build.xml
index 0ec1ea4..e7d5c8b 100644
--- a/tutorial/java/build.xml
+++ b/tutorial/java/build.xml
@@ -23,7 +23,17 @@
   <property name="src" location="src" />
   <property name="gen" location="../gen-java" />
   <property name="build" location="build" />
-  <property name="cpath" location="/usr/local/lib/libthrift.jar" />
+
+  <path id="libs.classpath">
+    <pathelement path="../../lib/java/libthrift.jar" />
+    <fileset dir="../../lib/java/build/ivy/lib">
+      <include name="*.jar" />
+    </fileset>
+  </path>
+  <path id="build.classpath">
+    <path refid="libs.classpath" />
+    <pathelement path="${gen}" />
+  </path>
 
   <target name="init">
     <tstamp />
@@ -31,8 +41,8 @@
   </target>
 
   <target name="compile" depends="init">
-    <javac srcdir="${gen}" destdir="${build}" classpath="${cpath}" />
-    <javac srcdir="${src}" destdir="${build}" classpath="${cpath}:${gen}" />
+    <javac srcdir="${gen}" destdir="${build}" classpathref="libs.classpath" />
+    <javac srcdir="${src}" destdir="${build}" classpathref="build.classpath" />
   </target>
 
   <target name="tutorial" depends="compile">