diff --git a/apps/routerconsole/java/build.xml b/apps/routerconsole/java/build.xml
index 9e9b697b6692779be56df12f353fe6fd82d067cd..61d1ddc85fdaa7d0c479f17f8cd03e517af51931 100644
--- a/apps/routerconsole/java/build.xml
+++ b/apps/routerconsole/java/build.xml
@@ -75,11 +75,17 @@
         <ant target="war" />
 
         <!-- Update the messages_*.po files.
-             We need to supply something for windows, and then change the fail property to true,
-             or else not run this on windows -->
-        <exec executable="sh" failifexecutionfails="false" >
+             We need to supply the bat file for windows, and then change the fail property to true -->
+        <exec executable="sh" osfamily="unix" failifexecutionfails="false" >
             <arg value="./bundle-messages.sh" />
         </exec>
+        <exec executable="sh" osfamily="mac" failifexecutionfails="false" >
+            <arg value="./bundle-messages.sh" />
+        </exec>
+        <exec executable="cmd" osfamily="windows" failifexecutionfails="false" >
+            <arg value="/c" />
+            <arg value="bundle-messages.bat" />
+        </exec>
         <!-- jar again to get the latest messages_*.class files -->
         <jar destfile="./build/routerconsole.jar" basedir="./build/obj" includes="**/*.class" update="true" />
     </target>