[Nice-commit] Nice/src/nice/tools/testsuite TestNice.java,1.27,1.28
Brought to you by:
bonniot
From: <bo...@us...> - 2003-11-28 02:57:16
|
Update of /cvsroot/nice/Nice/src/nice/tools/testsuite In directory sc8-pr-cvs1:/tmp/cvs-serv10718/src/nice/tools/testsuite Modified Files: TestNice.java Log Message: Load classes using a custom classloader using directories instead of using URLClassLoader, since it seems that one has performance issues, at least on Windows. Index: TestNice.java =================================================================== RCS file: /cvsroot/nice/Nice/src/nice/tools/testsuite/TestNice.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** TestNice.java 27 Nov 2003 22:45:59 -0000 1.27 --- TestNice.java 28 Nov 2003 02:57:13 -0000 1.28 *************** *** 499,520 **** */ static ClassLoader getClassLoader() { - ClassLoader classLoader = null; - - try { - // This is normally where the compiled classes are in the dev tree. - if (_runtime == null) - _runtime = "classes"; ! URL[] urls = { ! new URL("file://" + getTempFolder().getAbsolutePath() + "/"), ! new URL("file://" + new File(getRuntime()).getAbsolutePath() + "/") ! }; ! classLoader = new java.net.URLClassLoader(urls, null); ! } ! catch(java.net.MalformedURLException ex) { ! throw new Error(ex.toString()); ! } ! return classLoader; } --- 499,509 ---- */ static ClassLoader getClassLoader() { ! // This is normally where the compiled classes are in the dev tree. ! if (_runtime == null) ! _runtime = "classes"; ! File[] dirs = { getTempFolder(), new File(getRuntime()) }; ! return new nice.tools.util.DirectoryClassLoader(dirs, null); } |