1 21 package com.db4o.j2me.bloat; 22 23 import java.io.*; 24 import java.lang.reflect.*; 25 import java.net.*; 26 27 public class EnhanceTestStarter { 28 public static void main(String [] args) throws Exception { 29 Generation.main(new String [0]); 30 String [] classpath={ 31 "generated", 32 "bin", 33 "../db4oj/bin", 34 "../db4ojdk1.2/bin", 35 }; 36 URL[] urls=new URL[classpath.length]; 37 for (int pathIdx = 0; pathIdx < classpath.length; pathIdx++) { 38 urls[pathIdx]=new File(classpath[pathIdx]).toURI().toURL(); 39 } 40 ClassLoader extCL = ClassLoader.getSystemClassLoader().getParent(); 42 URLClassLoader urlCL=new URLClassLoader(urls,extCL); 43 Class mainClazz=urlCL.loadClass(EnhanceTestMain.class.getName()); 44 Method mainMethod=mainClazz.getMethod("main",new Class []{String [].class}); 45 mainMethod.invoke(null, new Object []{new String [0]}); 46 } 47 } 48 | Popular Tags |