This will not work. The only way to use another vm (resp. bootstrap classes) is to fork a new system process outside the current one.
Cheers Rainer > -----Original Message----- > From: Jose Noheda [mailto:[EMAIL PROTECTED] > Sent: Wednesday, August 30, 2006 12:22 PM > To: dev@ant.apache.org > Subject: New classloader inside an application > > > Hi, > > We have moved some ant scripts to a JAVA application. This > application has been developed using JDK1.5 and it's running > under a SUN JVM in an AIX machine. One of the tasks we have > to execute is an external task from IBM (WsEjbDeploy). > Basically it generates stubs for EJBs. The main problem comes > from the fact that this task only operates well under IBM JDK1.4. > > We have tried: > > Path java14 = new Path(antProject); > java14.setLocation(new File(pathToJava14)); > AntClassLoader loader = antProject.createClassLoader(java14); > loader.addLoaderPackageRoot("com.ibm.websphere"); > antProject.addBuildListener(loader); > antProject.setCoreLoader(loader); > > And different combinations of the above code to no avail. Ant > will always be executed under the SUN JVM. Is there anything > we are missing? > > Thanks in advance, > > JoSE > ==== > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]