You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@ant.apache.org by st...@apache.org on 2006/08/23 14:36:46 UTC

svn commit: r434030 - /ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java

Author: stevel
Date: Wed Aug 23 05:36:46 2006
New Revision: 434030

URL: http://svn.apache.org/viewvc?rev=434030&view=rev
Log:
bug ID#38732 , rmic task doesn't work with -Xnew and JDK 6.0

Fixed by writing a new adapter, xnew, that extends the forking adapter and sets the -Xnew argument. Tests supplied, though the old test, the one that would fail on java1.6, is still there.

Also made the name matching code of rmic locale-independent.

Added:
    ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java

Added: ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java
URL: http://svn.apache.org/viewvc/ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java?rev=434030&view=auto
==============================================================================
--- ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java (added)
+++ ant/core/trunk/src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java Wed Aug 23 05:36:46 2006
@@ -0,0 +1,33 @@
+package org.apache.tools.ant.taskdefs.rmic;
+
+import org.apache.tools.ant.types.Commandline;
+
+/**
+ * Run rmic in a new process with -Xnew set.
+ * This switches rmic to use a new compiler, one that doesnt work in-process
+ * on ant on java1.6 
+ * @see: http://issues.apache.org/bugzilla/show_bug.cgi?id=38732
+ */
+public class XNewRmic extends ForkingSunRmic {
+
+    /**
+     * the name of this adapter for users to select
+     */
+    public static final String COMPILER_NAME = "xnew";
+    
+    public XNewRmic() {
+    }
+
+    /**
+     * Create a normal command line, then with -Xnew at the front
+     * @return a command line that hands off to thw
+     */
+    protected Commandline setupRmicCommand() {
+        String options[]=new String[] {
+                "-Xnew"
+        };
+        Commandline commandline = super.setupRmicCommand(options);
+        return commandline;
+    }
+
+}



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org