ant-notifications mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 48633] New: Launcher class use of URLClassLoader makes it impossible to launch Ant from custom URLClassLoader
Date Thu, 28 Jan 2010 03:42:46 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=48633

           Summary: Launcher class use of URLClassLoader makes it
                    impossible to launch Ant from custom URLClassLoader
           Product: Ant
           Version: 1.8.0RC1
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Core
        AssignedTo: notifications@ant.apache.org
        ReportedBy: eric@tibco.com


The current Launcher class uses this code:

        URLClassLoader loader = new URLClassLoader(jars);

Unfortunately, I'm trying to run Ant from an already running Java program, and
I don't want to launch an entirely new VM just to spawn Ant.

So I tried putting the Ant launcher into a URLClassLoader(), and it doesn't
work.

If I changed the above line to:

        URLClassLoader loader = new URLClassLoader(jars,
getClass().getClassLoader() );

my bootstrap code works as expected.  Is there any reason against making this
change?

Problem observed in the source for both Ant 1.7.1 and the latest 1.8.0RC1

-- 
Configure bugmail: https://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

Mime
View raw message