Return-Path: Delivered-To: apmail-harmony-dev-archive@www.apache.org Received: (qmail 7822 invoked from network); 5 Aug 2009 09:46:02 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 5 Aug 2009 09:46:02 -0000 Received: (qmail 30384 invoked by uid 500); 5 Aug 2009 09:46:09 -0000 Delivered-To: apmail-harmony-dev-archive@harmony.apache.org Received: (qmail 30284 invoked by uid 500); 5 Aug 2009 09:46:09 -0000 Mailing-List: contact dev-help@harmony.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@harmony.apache.org Delivered-To: mailing list dev@harmony.apache.org Received: (qmail 30273 invoked by uid 99); 5 Aug 2009 09:46:09 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 09:46:09 +0000 X-ASF-Spam-Status: No, hits=2.2 required=10.0 tests=HTML_MESSAGE,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of mohanraj.l@gmail.com designates 209.85.219.212 as permitted sender) Received: from [209.85.219.212] (HELO mail-ew0-f212.google.com) (209.85.219.212) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 05 Aug 2009 09:46:01 +0000 Received: by ewy8 with SMTP id 8so1083065ewy.36 for ; Wed, 05 Aug 2009 02:45:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=GkCb5c/Z+1fYQQIib9RLxgXbb/a9JHyozRRRUuss+pk=; b=RxdN00/lwJ8qKNBgiaznu+VBYwXyArUbhLJrkEIKnY1G472TQriU+7ow8h8kAl9eMZ xQQyZ8YGIa7RsMNPsTK5wRXVr0PIxM2KMv82rZ4LQHuDMuOvs6VIIZgYLWt+p2horzrk w462VmtwejNAo1MDP8Y6H9w707qNqhwo/MxIU= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=kG92FyxOHtN92lO7Q4hiAOTU80VRnJ9mWsngh/62h4WZmDenYWR6CyG3UB1bnf+Q5U 45TWmhceJ45T3KFVAQMeCLvssTIm2w0ADxrdnq/ukL/CGQ5YUmivKuhDkb1SZ9M4nUv5 Mm3JrWnHAjWBT+5sUjfP3Eosic3aUsOSskKPs= MIME-Version: 1.0 Received: by 10.210.34.5 with SMTP id h5mr10163002ebh.71.1249465539754; Wed, 05 Aug 2009 02:45:39 -0700 (PDT) Date: Wed, 5 Aug 2009 15:15:39 +0530 Message-ID: <6bb42ff70908050245j18e3af85x66569e1cd04a8253@mail.gmail.com> Subject: HDK ClassLoader behavior differs from RI From: Mohanraj Loganathan To: dev@harmony.apache.org Content-Type: multipart/alternative; boundary=0015174beeb8a7fceb047061ddf3 X-Virus-Checked: Checked by ClamAV on apache.org --0015174beeb8a7fceb047061ddf3 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit I am getting the different output with HDK and RI with the following scenario Step1: Compile TestInnerClass.java [1] by including junit.jar in the classpath. Step2: Through reflection call the innerclass TestInnerClass$ExceptingEntryPoint main method (refer [2]) without including the junit.jar in the classpath HDK: throws NoClassDefFoundError: junit/framework/TestCase RI: prints "I am printing from TestInnerClass$ExceptingEntryPoint" Any thougts on this. P.S: One of the ANT unit-testcase implements this scenario due to which 4 tests are failing. [1] TestInnerClass .java import junit.framework.TestCase; public class TestInnerClass extends TestCase{ public static class ExceptingEntryPoint { public static void main(String[] argv) { System.out.println("I am printing from TestInnerClass$ExceptingEntryPoint"); } } } [2] Testcase: ClassLoadTest.java import java.lang.reflect.Method; public class ClassLoadTest { public void callMain() throws Exception{ String classname = "TestInnerClass$ExceptingEntryPoint"; Class target = Class.forName(classname, true, this.getClass().getClassLoader()); Method main = target.getMethod("main", new Class[] {String[].class}); main.invoke(null, (Object[])new String[] {null}); } public static void main(String[] args) throws Exception{ new ClassLoadTest().callMain(); } } Thanks and Regards, Mohan --0015174beeb8a7fceb047061ddf3--