You are viewing a plain text version of this content. The canonical link for it is here.
Posted to site-dev@james.apache.org by Apache Wiki <wi...@apache.org> on 2011/11/20 12:17:36 UTC

[James Wiki] Trivial Update of "Embedded" by newacct

Dear Wiki user,

You have subscribed to a wiki page or wiki category on "James Wiki" for change notification.

The "Embedded" page has been changed by newacct:
http://wiki.apache.org/james/Embedded?action=diff&rev1=11&rev2=12

  
      public static ClassLoader phoenixHomeClassLoader()
      {
-     	File[] libjars = (new File(System.getProperty( "phoenix.home" )+"/lib")).listFiles(new FilenameFilter() {
+     	File[] libjars = new File(System.getProperty( "phoenix.home" )+"/lib").listFiles(new FilenameFilter() {
      		public boolean accept(File dir, String name) {
      			return (name.endsWith(".jar"));
      		}});
-     	File[] binjars = (new File(System.getProperty( "phoenix.home" )+"/bin")).listFiles(new FilenameFilter() {
+     	File[] binjars = new File(System.getProperty( "phoenix.home" )+"/bin").listFiles(new FilenameFilter() {
      		public boolean accept(File dir, String name) {
      			return (name.endsWith(".jar"));
      		}});
-     	File[] binlibjars = (new File(System.getProperty( "phoenix.home" )+"/bin/lib")).listFiles(new FilenameFilter() {
+     	File[] binlibjars = new File(System.getProperty( "phoenix.home" )+"/bin/lib").listFiles(new FilenameFilter() {
      		public boolean accept(File dir, String name) {
      			return (name.endsWith(".jar"));
      		}});
-     	File[] catalinajars = (new File(System.getProperty( "catalina.home" )+"/shared/lib")).listFiles(new FilenameFilter() {
+     	File[] catalinajars = new File(System.getProperty( "catalina.home" )+"/shared/lib").listFiles(new FilenameFilter() {
      		public boolean accept(File dir, String name) {
      			return (name.endsWith(".jar"));
      		}});
@@ -225, +225 @@

              //Create main launcher
              final Class clazz = commonLibClassLoader.loadClass( MAIN_CLASS );
              final Class[] paramTypes =
-                 new Class[]{args.getClass(), Map.class, Boolean.TYPE};
+                 {args.getClass(), Map.class, boolean.class};
              final Method method = clazz.getMethod( "main", paramTypes );
              c_frontend = clazz.newInstance();
  
@@ -270, +270 @@

      		        new File("C:\\Documents and Settings\\Owner\\Desktop\\james-2.2.0\\bin\\phoenix-loader-modified.jar").toURL()
          	});
              final Class mainClass = childClassLoader.loadClass( "org.apache.avalon.phoenix.launcher.Main" );
-             final Class[] paramTypes =
+             final Class[] paramTypes = {args.getClass()};
-         	new Class[]{args.getClass()};
              final Method method = mainClass.getMethod( "main", paramTypes );
              Object main_instance = mainClass.newInstance();
              method.invoke(main_instance, new Object[]{args} );