Index: /applications/editors/josm/plugins/build-common.xml
===================================================================
--- /applications/editors/josm/plugins/build-common.xml	(revision 30698)
+++ /applications/editors/josm/plugins/build-common.xml	(revision 30699)
@@ -25,4 +25,15 @@
     <property name="ant.build.javac.source" value="1.7"/>
     <property name="plugin.jar"             location="${plugin.dist.dir}/${ant.project.name}.jar"/>
+
+    <!-- For Windows-specific stuff -->
+    <condition property="isWindows">
+        <os family="Windows"/>
+    </condition>
+    <target name="-jaxb_win" if="isWindows">
+        <property name="xjc" value="${java.home}\..\bin\xjc.exe" />
+    </target>
+    <target name="-jaxb_nix" unless="isWindows">
+        <property name="xjc" value="${java.home}/../bin/xjc" />
+    </target>
 
     <!--
Index: /applications/editors/josm/plugins/opendata/build.xml
===================================================================
--- /applications/editors/josm/plugins/opendata/build.xml	(revision 30698)
+++ /applications/editors/josm/plugins/opendata/build.xml	(revision 30699)
@@ -77,5 +77,5 @@
     **********************************************************
     -->
-    <target name="compile_neptune" depends="init">
+    <target name="compile_neptune" depends="init, xjc_neptune">
         <echo message="compiling Neptune ... "/>
         <javac srcdir="includes/neptune" debug="false" destdir="${plugin.build.dir}" includeAntRuntime="false" encoding="UTF-8" />
@@ -100,12 +100,14 @@
     </target>
     
-    <taskdef name="xjc" classname="com.sun.tools.xjc.XJCTask">
-          <classpath>
-            <fileset dir="lib/jaxb" includes="*.jar" />
-          </classpath>
-    </taskdef>
-    
-    <target name="xjc_neptune">
-        <xjc schema="resources/neptune/neptune.xsd" destdir="includes" package="neptune" target="2.1" />
+    <target name="xjc_neptune" depends="init, -jaxb_win, -jaxb_nix" unless="jaxb.notRequired">
+        <exec executable="${xjc}" failonerror="true">
+            <arg value="-d"/>
+            <arg value="includes"/>
+            <arg value="-p"/>
+            <arg value="neptune"/>
+            <arg value="-encoding"/>
+            <arg value="UTF-8"/>
+            <arg value="resources/neptune/neptune.xsd"/>
+        </exec>
     </target>
 </project>
