Use mingw32 to build the windows launchers. These are useful if the Netbeans platform is used to build 
another application on Debian which you want to be able to run on a Windows system.

Index: libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/Makefile
===================================================================
--- libnb-platform-java-7.0+dfsg1.orig/o.n.bootstrap/launcher/windows/Makefile	2011-06-13 21:39:36.107758898 +0100
+++ libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/Makefile	2011-06-14 23:46:57.388989761 +0100
@@ -34,7 +34,7 @@
 MKDIR=mkdir
 CP=cp
 CCADMIN=CCadmin
-RANLIB=ranlib
+RANLIB=i586-mingw32msvc-ranlib
 
 # build
 build: .build-post
@@ -48,8 +48,8 @@
 	cp nbexec.dll ../../../nbbuild/netbeans/platform/lib/
 
 nbexec.exe: nbexecexe.cpp nbexecloader.h utilsfuncs.cpp nbexec_exe.rc
-	windres.exe -Ocoff nbexec_exe.rc nbexec_exe.res
-	g++ -s -mno-cygwin nbexecexe.cpp utilsfuncs.cpp nbexec_exe.res -o nbexec.exe
+	i586-mingw32msvc-windres -Ocoff nbexec_exe.rc nbexec_exe.res
+	i586-mingw32msvc-g++ -s -mno-cygwin nbexecexe.cpp utilsfuncs.cpp nbexec_exe.res -o nbexec.exe
 
 # clean
 clean: .clean-post
Index: libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec.mk
===================================================================
--- libnb-platform-java-7.0+dfsg1.orig/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec.mk	2011-06-13 21:39:36.137760501 +0100
+++ libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/nbproject/Makefile-nbexec.mk	2011-06-14 23:47:19.998990498 +0100
@@ -11,12 +11,12 @@
 MKDIR=mkdir
 CP=cp
 CCADMIN=CCadmin
-RANLIB=ranlib
-CC=gcc
-CCC=g++
-CXX=g++
+RANLIB=i586-mingw32msvc-ranlib
+CC=i586-mingw32msvc-gcc
+CCC=i586-mingw32msvc-g++
+CXX=i586-mingw32msvc-g++
 FC=
-AS=as
+AS=i586-mingw32msvc-as
 
 # Macros
 CND_PLATFORM=Cygwin-Windows
@@ -65,22 +65,22 @@
 ${OBJECTDIR}/platformlauncher.o: nbproject/Makefile-${CND_CONF}.mk platformlauncher.cpp 
 	${MKDIR} -p ${OBJECTDIR}
 	${RM} $@.d
-	$(COMPILE.cc) -O2 -Wall -s -I/cygdrive/c/cygwin/usr/include/mingw -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include/win32 -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
+	$(COMPILE.cc) -O2 -Wall -s -I/usr/lib/jvm/default-java/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/platformlauncher.o platformlauncher.cpp
 
 ${OBJECTDIR}/nbexec.o: nbproject/Makefile-${CND_CONF}.mk nbexec.cpp 
 	${MKDIR} -p ${OBJECTDIR}
 	${RM} $@.d
-	$(COMPILE.cc) -O2 -Wall -s -I/cygdrive/c/cygwin/usr/include/mingw -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include/win32 -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
+	$(COMPILE.cc) -O2 -Wall -s -I/usr/lib/jvm/default-java/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexec.o nbexec.cpp
 
 ${OBJECTDIR}/nbexec.res: nbproject/Makefile-${CND_CONF}.mk nbexec.rc version.h
 	${MKDIR} -p ${OBJECTDIR}
 	@echo Compiling Resource files...
-	windres.exe -Ocoff nbexec.rc ${OBJECTDIR}/nbexec.res
+	i586-mingw32msvc-windres -Ocoff nbexec.rc ${OBJECTDIR}/nbexec.res
 
 ${OBJECTDIR}/nbexecexe.o: nbproject/Makefile-${CND_CONF}.mk nbexecexe.cpp 
 	${MKDIR} -p ${OBJECTDIR}
 	${RM} $@.d
-	$(COMPILE.cc) -O2 -Wall -s -I/cygdrive/c/cygwin/usr/include/mingw -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include/win32 -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
+	$(COMPILE.cc) -O2 -Wall -s -I/usr/lib/jvm/default-java/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/nbexecexe.o nbexecexe.cpp
 
 : nbproject/Makefile-${CND_CONF}.mk nbexec_exe.rc 
 	@echo 
@@ -89,12 +89,12 @@
 ${OBJECTDIR}/jvmlauncher.o: nbproject/Makefile-${CND_CONF}.mk jvmlauncher.cpp 
 	${MKDIR} -p ${OBJECTDIR}
 	${RM} $@.d
-	$(COMPILE.cc) -O2 -Wall -s -I/cygdrive/c/cygwin/usr/include/mingw -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include/win32 -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
+	$(COMPILE.cc) -O2 -Wall -s -I/usr/lib/jvm/default-java/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/jvmlauncher.o jvmlauncher.cpp
 
 ${OBJECTDIR}/utilsfuncs.o: nbproject/Makefile-${CND_CONF}.mk utilsfuncs.cpp 
 	${MKDIR} -p ${OBJECTDIR}
 	${RM} $@.d
-	$(COMPILE.cc) -O2 -Wall -s -I/cygdrive/c/cygwin/usr/include/mingw -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include/win32 -I/cygdrive/D/Program\ Files/Java/jdk1.6.0_22/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
+	$(COMPILE.cc) -O2 -Wall -s -I/usr/lib/jvm/default-java/include -fPIC  -MMD -MP -MF $@.d -o ${OBJECTDIR}/utilsfuncs.o utilsfuncs.cpp
 
 # Subprojects
 .build-subprojects:
Index: libnb-platform-java-7.0+dfsg1/apisupport.harness/windows-launcher-src/Makefile
===================================================================
--- libnb-platform-java-7.0+dfsg1.orig/apisupport.harness/windows-launcher-src/Makefile	2011-06-14 23:46:57.338990509 +0100
+++ libnb-platform-java-7.0+dfsg1/apisupport.harness/windows-launcher-src/Makefile	2011-06-14 23:56:49.309005828 +0100
@@ -34,7 +34,7 @@
 MKDIR=mkdir
 CP=cp
 CCADMIN=CCadmin
-RANLIB=ranlib
+RANLIB=i586-mingw32msvc-ranlib
 
 
 # build
@@ -47,10 +47,11 @@
 # Add your post 'build' code here...
 
 app.res : app.rc
-	windres -o$@ -Ocoff app.rc
+	i586-mingw32msvc-windres -o$@ -Ocoff app.rc
 
 # clean
 clean: .clean-post
+	rm -f app.res
 
 .clean-pre:
 # Add your pre 'clean' code here...
Index: libnb-platform-java-7.0+dfsg1/apisupport.harness/windows-launcher-src/nbproject/Makefile-Release.mk
===================================================================
--- libnb-platform-java-7.0+dfsg1.orig/apisupport.harness/windows-launcher-src/nbproject/Makefile-Release.mk	2011-06-14 23:46:57.358990425 +0100
+++ libnb-platform-java-7.0+dfsg1/apisupport.harness/windows-launcher-src/nbproject/Makefile-Release.mk	2011-06-14 23:47:19.998990498 +0100
@@ -11,10 +11,10 @@
 MKDIR=mkdir
 CP=cp
 CCADMIN=CCadmin
-RANLIB=ranlib
-CC=gcc.exe
-CCC=g++.exe
-CXX=g++.exe
+RANLIB=i586-mingw32msvc-ranlib
+CC=i586-mingw32msvc-gcc
+CCC=i586-mingw32msvc-g++
+CXX=i586-mingw32msvc-g++
 FC=
 AS=
 
@@ -84,7 +84,7 @@
 # Clean Targets
 .clean-conf:
 	${RM} -r build/Release
-	${RM} ../release/launchers/app.exe.exe
+	${RM} ../release/launchers/app.exe
 
 # Subprojects
 .clean-subprojects:
Index: libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/jvmlauncher.h
===================================================================
--- libnb-platform-java-7.0+dfsg1.orig/o.n.bootstrap/launcher/windows/jvmlauncher.h	2011-06-14 23:46:57.428989809 +0100
+++ libnb-platform-java-7.0+dfsg1/o.n.bootstrap/launcher/windows/jvmlauncher.h	2011-06-15 18:56:36.509511571 +0100
@@ -50,6 +50,18 @@
 #include <windows.h>
 #include <string>
 #include <list>
+
+// Use the definitions below rather than the linux jdk ones
+#define _JAVASOFT_JNI_MD_H_
+// imports, exports, and calling conventions need to match those used in a dll
+#define JNIEXPORT __declspec(dllexport)
+#define JNIIMPORT __declspec(dllimport)
+#define JNICALL __stdcall
+// Correct types for the windows platform
+typedef long jint;
+typedef __int64 jlong;
+typedef signed char jbyte;
+
 #include "jni.h"
 #include "utilsfuncs.h"
 
