private Class<?> loadOpenEJBClass() throws Exception { final ClassPath classPath = SystemInstance.get().getClassPath(); final ClassLoader classLoader = classPath.getClassLoader(); try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (final Exception e) { try { checkOpenEjbHome(SystemInstance.get().getHome().getDirectory()); final FileUtils home = SystemInstance.get().getHome(); classPath.addJarsToPath(home.getDirectory("lib")); } catch (final Exception e2) { throw new Exception("Could not load OpenEJB libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (final Exception e2) { throw new Exception("Could not load OpenEJB class after embedding libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } } }
final File dir = new File(repository.substring(0, repository.length() - "*.jar".length())); if (dir.isDirectory()) { systemCP.addJarsToPath(dir); systemCP.addJarsToPath(lib); systemCP.addJarToPath(lib.toURI().toURL());
private Class forcefulLoad(ClassPath classPath, ClassLoader classLoader) throws Exception { try { File libsDir; String libsPath = SystemInstance.get().getProperty("openejb.libs"); if (libsPath != null){ libsDir = new File(libsPath); } else { checkOpenEjbHome(SystemInstance.get().getHome().getDirectory()); FileUtils home = SystemInstance.get().getHome(); libsDir = home.getDirectory("lib"); } classPath.addJarsToPath(libsDir); } catch (Exception e2) { throw new Exception("Could not load OpenEJB libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } try { return classLoader.loadClass(className); } catch (Exception e2) { throw new Exception("Could not load class '"+className+"' after embedding libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } }
private Class<?> loadOpenEJBClass() throws Exception { final ClassPath classPath = SystemInstance.get().getClassPath(); final ClassLoader classLoader = classPath.getClassLoader(); try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (final Exception e) { try { checkOpenEjbHome(SystemInstance.get().getHome().getDirectory()); final FileUtils home = SystemInstance.get().getHome(); classPath.addJarsToPath(home.getDirectory("lib")); } catch (final Exception e2) { throw new Exception("Could not load OpenEJB libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (final Exception e2) { throw new Exception("Could not load OpenEJB class after embedding libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } } }
private Class<?> loadOpenEJBClass() throws Exception { ClassPath classPath = SystemInstance.get().getClassPath(); ClassLoader classLoader = classPath.getClassLoader(); try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (Exception e) { try { checkOpenEjbHome(SystemInstance.get().getHome().getDirectory()); FileUtils home = SystemInstance.get().getHome(); classPath.addJarsToPath(home.getDirectory("lib")); } catch (Exception e2) { throw new Exception("Could not load OpenEJB libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } try { return classLoader.loadClass("org.apache.openejb.OpenEJB"); } catch (Exception e2) { throw new Exception("Could not load OpenEJB class after embedding libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); } } }
libsDir = home.getDirectory("lib"); classPath.addJarsToPath(libsDir); } catch (final Exception e2) { throw new Exception("Could not load OpenEJB libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); final File additionalLib = SystemInstance.get().getBase().getDirectory(ADDITIONAL_LIB_FOLDER); if (additionalLib.exists()) { classPath.addJarsToPath(additionalLib);
libsDir = home.getDirectory("lib"); classPath.addJarsToPath(libsDir); } catch (final Exception e2) { throw new Exception("Could not load OpenEJB libraries. Exception: " + e2.getClass().getName() + " " + e2.getMessage()); final File additionalLib = SystemInstance.get().getBase().getDirectory(ADDITIONAL_LIB_FOLDER); if (additionalLib.exists()) { classPath.addJarsToPath(additionalLib);
final SystemInstance system = SystemInstance.get(); File libs = system.getHome().getDirectory("lib"); system.getClassPath().addJarsToPath(libs); initServer(system); } catch (DontStartServerException ignored) {
SystemInstance system = SystemInstance.get(); File libs = system.getHome().getDirectory("lib"); system.getClassPath().addJarsToPath(libs); initServer(); } catch (DontStartServerException ignored) {