diff -Nru openjdk-ecj.orig/corba/make/common/shared/Defs-java.gmk openjdk-ecj/corba/make/common/shared/Defs-java.gmk
--- openjdk-ecj.orig/corba/make/common/shared/Defs-java.gmk	2008-10-22 18:45:43.000000000 +0100
+++ openjdk-ecj/corba/make/common/shared/Defs-java.gmk	2008-10-22 18:49:29.000000000 +0100
@@ -75,7 +75,9 @@
 JAVAC_JVM_FLAGS    += $(JAVA_TOOLS_FLAGS:%=-J%)
 
 # The jar -J options are special, must be added at the end of the command line
+ifneq (,$(JAR_KNOWS_J_OPTIONS))
 JAR_JFLAGS       = $(JAVA_TOOLS_FLAGS:%=-J%)
+endif
 
 # JAVA_TOOLS_DIR is the default location to find Java tools to run, if
 #    langtools is not available.
diff -Nru openjdk-ecj.orig/jdk/make/common/shared/Defs-java.gmk openjdk-ecj/jdk/make/common/shared/Defs-java.gmk
--- openjdk-ecj.orig/jdk/make/common/shared/Defs-java.gmk	2008-10-22 19:14:30.000000000 +0100
+++ openjdk-ecj/jdk/make/common/shared/Defs-java.gmk	2008-10-22 19:15:00.000000000 +0100
@@ -82,7 +82,9 @@
 JAVAC_JVM_FLAGS    += $(JAVA_TOOLS_FLAGS:%=-J%)
 
 # The jar -J options are special, must be added at the end of the command line
+ifneq (,$(JAR_KNOWS_J_OPTIONS))
 JAR_JFLAGS       = $(JAVA_TOOLS_FLAGS:%=-J%)
+endif
 
 # JAVA_TOOLS_DIR is the default location to find Java tools to run, if
 #    langtools is not available.
