diff --git a/apps/addressbook/build.xml b/apps/addressbook/build.xml
index 5b22cd200e18c3c9c055be484d45bf1488862c61..c4b214feb7f87eb3ada6f6338ffcf7026c6b329f 100644
--- a/apps/addressbook/build.xml
+++ b/apps/addressbook/build.xml
@@ -1,7 +1,7 @@
 <?xml version="1.0"?>
 <project name="addressbook" default="war" basedir=".">
 
-	<property name="src" value="java/src/addressbook"/>
+	<property name="src" value="java/src"/>
 	<property name="build" value="build"/>
 	<property name="dist"  location="dist"/>
 	<property name="jar" value="addressbook.jar"/>
@@ -19,7 +19,20 @@
 
 	<target name="distclean" depends="clean" />
 
-	<target name="compile" depends="init">
+        <target name="depend">
+            <depend
+                cache="../../build"
+                srcdir="${src}"
+                destdir="${build}" >
+                <!-- Depend on classes instead of jars where available -->
+                <classpath>
+                    <pathelement location="../../core/java/build/obj" />
+                    <pathelement location="../jetty/jettylib/javax.servlet.jar" />
+                </classpath>
+            </depend>
+        </target>
+
+	<target name="compile" depends="init, depend">
 		<javac debug="true" deprecation="on" source="1.5" target="1.5" 
                        srcdir="${src}" destdir="${build}">
             <classpath>
@@ -37,7 +50,7 @@
 		</jar>
 	</target>
 	
-	<target name="war" depends="compile">
+	<target name="war" depends="compile" unless="war.uptodate">
 		<mkdir dir="${dist}/tmp"/>
 		<mkdir dir="${dist}/tmp/WEB-INF"/>
 		<mkdir dir="${dist}/tmp/WEB-INF/classes"/>
@@ -48,4 +61,8 @@
 		<delete dir="${dist}/tmp"/>
 	</target>
 	
+        <uptodate property="war.uptodate" targetfile="${dist}/${war}">
+            <srcfiles dir= "." includes="${build}/**/*.class, web.xml"/>
+        </uptodate>
+
 </project>
diff --git a/apps/i2psnark/java/build.xml b/apps/i2psnark/java/build.xml
index 548e129aeb7311f71c90ccd6fda6f2e4cd16d96a..0a882af6d20ab004a0edf6fbcbb6d3ac047214d1 100644
--- a/apps/i2psnark/java/build.xml
+++ b/apps/i2psnark/java/build.xml
@@ -7,7 +7,22 @@
         <ant dir="../../streaming/java/" target="build" />
 	<!-- streaming will build ministreaming and core -->
     </target>
-    <target name="compile">
+    <target name="depend">
+        <depend
+            cache="../../../build"
+            srcdir="./src" 
+            destdir="./build/obj" >
+            <!-- Depend on classes instead of jars where available -->
+            <classpath>
+                <pathelement location="../../../core/java/build/obj" />
+                <pathelement location="../../../router/java/build/obj" />
+                <pathelement location="../../ministreaming/java/build/obj" />
+                <pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
+                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
+            </classpath>
+        </depend>
+    </target>
+    <target name="compile" depends="depend">
         <mkdir dir="./build" />
         <mkdir dir="./build/obj" />
         <javac 
diff --git a/apps/i2ptunnel/java/build.xml b/apps/i2ptunnel/java/build.xml
index 4221d6eff9a1d95c9dbb8d07f27537701794df44..6db84dbf34e651d40479d40f49d4b73a9cc405d4 100644
--- a/apps/i2ptunnel/java/build.xml
+++ b/apps/i2ptunnel/java/build.xml
@@ -7,7 +7,19 @@
         <ant dir="../../jetty/" target="build" />
 	<!-- ministreaming will build core -->
     </target>
-    <target name="compile">
+    <target name="depend">
+        <depend
+            cache="../../../build"
+            srcdir="./src" 
+            destdir="./build/obj" >
+            <!-- Depend on classes instead of jars where available -->
+            <classpath>
+                <pathelement location="../../../core/java/build/obj" />
+                <pathelement location="../../ministreaming/java/build/obj" />
+            </classpath>
+        </depend>
+    </target>
+    <target name="compile" depends="depend">
         <mkdir dir="./build" />
         <mkdir dir="./build/obj" />
         <javac 
diff --git a/apps/ministreaming/java/build.xml b/apps/ministreaming/java/build.xml
index 321ebf2c8c1e3bec4dd88eece16b82b50d6ef749..72a65d89c5bd241a391e815c34208ab099eebe75 100644
--- a/apps/ministreaming/java/build.xml
+++ b/apps/ministreaming/java/build.xml
@@ -5,7 +5,18 @@
     <target name="builddep">
         <ant dir="../../../core/java/" target="build" />
     </target>
-    <target name="compile">
+    <target name="depend">
+        <depend
+            cache="../../../build"
+            srcdir="./src" 
+            destdir="./build/obj" >
+            <!-- Depend on classes instead of jars where available -->
+            <classpath>
+                <pathelement location="../../../core/java/build/obj" />
+            </classpath>
+        </depend>
+    </target>
+    <target name="compile" depends="depend">
         <mkdir dir="./build" />
         <mkdir dir="./build/obj" />
         <javac srcdir="./src" debug="true" deprecation="on" source="1.5" target="1.5" destdir="./build/obj" classpath="../../../core/java/build/i2p.jar" />
diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml
index e263d4ca63e729d2557fcf05912a81cf8839e4ee..cea75a248cd02b17d1e5a27bad3dc02ed0544f07 100644
--- a/apps/routerconsole/java/build.xml
+++ b/apps/routerconsole/java/build.xml
@@ -10,7 +10,32 @@
     <target name="prepare">
         <ant dir="../../jetty/" target="build" />
     </target>
-    <target name="compile" depends="prepare">
+    <target name="depend">
+        <depend
+            cache="../../../build"
+            srcdir="./src" 
+            destdir="./build/obj" >
+            <!-- Depend on classes instead of jars where available -->
+            <classpath>
+                <pathelement location="../../../core/java/build/obj" />
+                <pathelement location="../../../router/java/build/obj" />
+                <pathelement location="../../jetty/jettylib/org.mortbay.jetty.jar" />
+                <pathelement location="../../jetty/jettylib/javax.servlet.jar" />
+                <pathelement location="../../systray/java/build/obj" />
+                <pathelement location="../../systray/java/lib/systray4j.jar" />
+                <pathelement location="../../../installer/lib/wrapper/win32/wrapper.jar" /> <!-- we dont care if we're not on win32 -->
+                <pathelement location="../../jrobin/jrobin-1.4.0.jar" />
+            </classpath>
+        </depend>
+        <!-- Force the dependency on the RouterVersion as depend doesn't recognize constant changes  -->
+        <dependset>
+             <srcfilelist dir="." files="../../../router/java/build/obj/net/i2p/router/RouterVersion.class" />
+             <targetfilelist dir="." files="build/obj/net/i2p/router/web/NewsFetcher.class" />
+             <targetfilelist dir="." files="build/obj/net/i2p/router/web/SummaryHelper.class" />
+             <targetfilelist dir="." files="build/obj/net/i2p/router/web/UpdateHandler.class" />
+        </dependset>
+    </target>
+    <target name="compile" depends="prepare, depend">
         <mkdir dir="./build" />
         <mkdir dir="./build/obj" />
         <javac 
diff --git a/apps/sam/java/build.xml b/apps/sam/java/build.xml
index aa111152274b62d88530083f5bc22d31d7dcc875..c0eab67a35ee5e61a41c6f5f7962327454be6679 100644
--- a/apps/sam/java/build.xml
+++ b/apps/sam/java/build.xml
@@ -6,7 +6,19 @@
         <ant dir="../../ministreaming/java/" target="build" />
 	<!-- ministreaming will build core -->
     </target>
-    <target name="compile">
+    <target name="depend">
+        <depend
+            cache="../../../build"
+            srcdir="./src" 
+            destdir="./build/obj" >
+            <!-- Depend on classes instead of jars where available -->
+            <classpath>
+                <pathelement location="../../../core/java/build/obj" />
+                <pathelement location="../../ministreaming/java/build/obj" />
+            </classpath>
+        </depend>
+    </target>
+    <target name="compile" depends="depend">
         <mkdir dir="./build" />
         <mkdir dir="./build/obj" />
         <javac 
diff --git a/apps/streaming/java/build.xml b/apps/streaming/java/build.xml
index bc02e8876fe4560e63b83858ae50c6ebddb3a562..5c79f97cc8189b9fc928b5939c0a0ffb965a4c97 100644
--- a/apps/streaming/java/build.xml
+++ b/apps/streaming/java/build.xml
@@ -6,7 +6,19 @@
         <ant dir="../../ministreaming/java/" target="build" />
 	<!-- ministreaming will build core -->
     </target>
-    <target name="compile">
+    <target name="depend">
+        <depend
+            cache="../../../build"
+            srcdir="./src" 
+            destdir="./build/obj" >
+            <!-- Depend on classes instead of jars where available -->
+            <classpath>
+                <pathelement location="../../../core/java/build/obj" />
+                <pathelement location="../../ministreaming/java/build/obj" />
+            </classpath>
+        </depend>
+    </target>
+    <target name="compile" depends="depend">
         <mkdir dir="./build" />
         <mkdir dir="./build/obj" />
         <javac 
diff --git a/core/java/build.xml b/core/java/build.xml
index d568db341260030e654b4e7ce4f899aa56cc4c6d..24b7a77bcd24d6b30f242fd88bc3358a1d1bd774 100644
--- a/core/java/build.xml
+++ b/core/java/build.xml
@@ -5,7 +5,14 @@
     <target name="builddep">
         <!-- noop, since the core doesnt depend on anything -->
     </target>
-    <target name="compile">
+    <target name="depend">
+        <depend
+            cache="../../build"
+            srcdir="./src" 
+            destdir="./build/obj" >
+        </depend>
+    </target>
+    <target name="compile" depends="depend">
         <mkdir dir="./build" />
         <mkdir dir="./build/obj" />
         <javac srcdir="./src" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" />
diff --git a/router/java/build.xml b/router/java/build.xml
index 0e0df9f62f87dd86d3a75d9f01fe69bb6009c4b1..b6c9281aa4fad128d05a07448e332e5808f9698c 100644
--- a/router/java/build.xml
+++ b/router/java/build.xml
@@ -8,7 +8,18 @@
     <target name="builddeptest">
         <ant dir="../../core/java/" target="jarTest" />
     </target>
-    <target name="compile">
+    <target name="depend">
+        <depend
+            cache="../../build"
+            srcdir="./src" 
+            destdir="./build/obj" >
+            <!-- Depend on classes instead of jars where available -->
+            <classpath>
+                <pathelement location="../../core/java/build/obj" />
+            </classpath>
+        </depend>
+    </target>
+    <target name="compile" depends="depend">
         <mkdir dir="./build" />
         <mkdir dir="./build/obj" />
         <javac srcdir="./src" debug="true" source="1.5" target="1.5" deprecation="on" destdir="./build/obj" classpath="../../core/java/build/i2p.jar" />