diff --git a/apps/sam/jython/build/build.bat b/apps/sam/jython/build/build.bat
index 96971b79ddce2b585464f8bba69a9da3f6d32d71..8df7db72106bf0bdec9979136085498d5cd8d8b0 100644
--- a/apps/sam/jython/build/build.bat
+++ b/apps/sam/jython/build/build.bat
@@ -3,6 +3,11 @@ rem This makefile constructs the SAM Server i2psam.jar
 rem Once you've built i2psam.jar, you'll need to copy it and
 rem jython.jar into the main jars directory
 
+@echo Ensuring i2p jars are built
+cd ..\..\..\..
+ant build
+cd apps\sam\jython\build
+
 @echo Building i2psam.jar
 @echo on
 set CLASSPATH=..\..\..\..\build\i2p.jar;..\..\..\..\build\mstreaming.jar