Browse Source

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.

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@434030 13f79535-47bb-0310-9956-ffa450edef68
master
Steve Loughran 19 years ago
parent
commit
8431ffa9d9
1 changed files with 33 additions and 0 deletions
  1. +33
    -0
      src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java

+ 33
- 0
src/main/org/apache/tools/ant/taskdefs/rmic/XNewRmic.java View File

@@ -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;
}
}

Loading…
Cancel
Save