Package java.io

Examples of java.io.File.toURL()


        classDir.mkdirs();
       
        RouteTypeUtil.invokeWSDLToJava(wsdlUrl, opDir, classDir);

        URLClassLoader loader =
            URLClassLoader.newInstance(new URL[] {classDir.toURL()},
                                       getClass().getClassLoader());
        return loader;
    }

    private void testRouterSourceAndDestination(Definition def,
View Full Code Here


            System.exit(0);
        }

        File wsdl = new File(args[0]);

        AddNumbersService service = new AddNumbersService(wsdl.toURL(), serviceName);
        AddNumbers port = (AddNumbers)service.getPort(portName, AddNumbers.class);
       
        try {
            int number1 = 10;
            int number2 = 20;
View Full Code Here

     */
    public FileObject getBaseTestFolder(final FileSystemManager manager)
        throws Exception
    {
        final File baseDir = AbstractVfsTestCase.getTestDirectoryFile();
        final URL url = baseDir.toURL();
        return manager.resolveFile(url.toExternalForm());
    }
}
View Full Code Here

     */
    public FileObject getBaseTestFolder(final FileSystemManager manager)
        throws Exception
    {
        final File baseDir = AbstractVfsTestCase.getTestDirectoryFile();
        final URL url = baseDir.toURL();
        return manager.resolveFile(url.toExternalForm());
    }
}
View Full Code Here

                final File file = new File((String)classpathFiles.get(ctr));
                if (this.getLog().isDebugEnabled())
                {
                    getLog().debug("adding to classpath '" + file + "'");
                }
                classpathUrls[ctr] = file.toURL();
            }

            final URLClassLoader loader =
                new ConfigurationClassLoader(classpathUrls,
                    Thread.currentThread().getContextClassLoader());
View Full Code Here

        classDir.mkdirs();
       
        rm.testInvokeWSDLToJava(opDir, classDir);
       
        URLClassLoader loader =
            URLClassLoader.newInstance(new URL[] {classDir.toURL()},
                                       null);
       
        Class<?> clz = loader.loadClass("org.objectweb.header_test.TestHeader");
        assertNotNull("TestHeader class instance should be present", clz);
       
View Full Code Here

           
            File metaInfDir = new File(componentContext.getInstallRoot(), "META-INF");
            File celtixConfig = new File(metaInfDir, CELTIX_CONFIG_FILE);
           
            if (celtixConfig.exists()) {
                System.setProperty("celtix.config.file", celtixConfig.toURL().toString());
                LOG.fine("set Celtix configuration to: " + System.getProperty("celtix.config.file"));
            } else {
                LOG.severe("could not find Celtix configuration in " + metaInfDir);
            }
           
View Full Code Here

        }

        URL wsdlURL;
        File wsdlFile = new File(args[0]);
        if (wsdlFile.exists()) {
            wsdlURL = wsdlFile.toURL();
        } else {
            wsdlURL = new URL(args[0]);
        }

        MessageFactory factory = MessageFactory.newInstance();
View Full Code Here

        File jbiXml = new File(metaInf, "jbi.xml");
        try {
            DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
            factory.setNamespaceAware(true);
            DocumentBuilder builder = factory.newDocumentBuilder();
            Document doc = builder.parse(jbiXml.toURL().toString());
           
            Element providesEl = (Element)findNode(doc.getDocumentElement(), "provides");
            endpointName = providesEl.getAttribute("endpoint-name");
        } catch (Exception ex) {
            LOG.log(Level.SEVERE, "error parsing " + jbiXml, ex);
View Full Code Here

       
        private Collection<Class<?>> find(Matcher matcher) throws MalformedURLException {
            List<Class<?>> classes = new ArrayList<Class<?>>();
           
            File root = new File(rootPath);
            URL[] urls = {root.toURL()};
            URLClassLoader loader = new URLClassLoader(urls, parent);
           
            find(root, loader, classes, matcher);
            return classes;
        }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.