Add jars to classpath without checking if they exist.
This commit is contained in:
parent
8cbcbd82ca
commit
050438c80a
1 changed files with 7 additions and 7 deletions
|
@ -30,8 +30,9 @@ public class Main {
|
||||||
String home = null;
|
String home = null;
|
||||||
// first, try to get helma home dir from command line options
|
// first, try to get helma home dir from command line options
|
||||||
for (int i=0; i<args.length; i++) {
|
for (int i=0; i<args.length; i++) {
|
||||||
if (args[i].equals ("-h") && i+1<args.length)
|
if (args[i].equals ("-h") && i+1<args.length) {
|
||||||
home = args[i+1];
|
home = args[i+1];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
URLClassLoader apploader = (URLClassLoader) ClassLoader.getSystemClassLoader();
|
URLClassLoader apploader = (URLClassLoader) ClassLoader.getSystemClassLoader();
|
||||||
// try to get Helma installation directory
|
// try to get Helma installation directory
|
||||||
|
@ -72,8 +73,7 @@ public class Main {
|
||||||
ArrayList jarlist = new ArrayList ();
|
ArrayList jarlist = new ArrayList ();
|
||||||
for (int i=0;i<jars.length;i++) {
|
for (int i=0;i<jars.length;i++) {
|
||||||
File jar = new File (libdir, jars[i]);
|
File jar = new File (libdir, jars[i]);
|
||||||
if (jar.exists())
|
jarlist.add (new URL ("file:" + jar.getAbsolutePath()));
|
||||||
jarlist.add (new URL ("file:" + jar.getAbsolutePath()));
|
|
||||||
}
|
}
|
||||||
// add all jar files from the lib/ext directory
|
// add all jar files from the lib/ext directory
|
||||||
File extdir =new File (libdir, "ext");
|
File extdir =new File (libdir, "ext");
|
||||||
|
|
Loading…
Add table
Reference in a new issue