harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sean Qiu (JIRA)" <j...@apache.org>
Subject [jira] Created: (HARMONY-3685) [classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
Date Wed, 18 Apr 2007 08:23:15 GMT
[classlib][tools] missing method of com.sun.tools.javac.Main.compile([Ljava.lang.String;, java.io.PrintWriter)
--------------------------------------------------------------------------------------------------------------

                 Key: HARMONY-3685
                 URL: https://issues.apache.org/jira/browse/HARMONY-3685
             Project: Harmony
          Issue Type: Bug
          Components: Classlib
         Environment: Windows XP
            Reporter: Sean Qiu


public class Test extends TestCase {
    public void test_main() throws Exception {
        File toolsJar = new File(System.getProperty("java.home"),
                "../lib/tools.jar");
        URLClassLoader loader = new URLClassLoader(
                new URL[] { toolsJar.toURL() });

        Class mainClass = loader.loadClass("com.sun.tools.javac.Main");
        StringWriter out = new StringWriter();
        Method compile = mainClass.getMethod("compile", new Class[] {
                String[].class, PrintWriter.class });

        Integer result = (Integer) compile.invoke(null, new Object[] {
                new String[0], new PrintWriter(out) });
        assertEquals(new Integer(2), result);
    }
}

====== Result ======
RI:       pass
Harmony:  throw java.lang.NoSuchMethodException: com.sun.tools.javac.Main.compile([Ljava.lang.String;,
java.io.PrintWriter)



-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message