Adding ACTIVEMQ_USER_CLASSPATH to make the ActiveMQ classpath more
extendable by users.  Also fixinng the classpath parsing to use the
right path separator dependening on the environment.
This commit is contained in:
Christopher L. Shannon (cshannon) 2016-01-28 21:09:52 +00:00
parent eac005a37f
commit e0ad700f2c
2 changed files with 10 additions and 2 deletions

View File

@ -271,7 +271,7 @@ public class Main {
public void addClassPathList(String fileList) {
if (fileList != null && fileList.length() > 0) {
StringTokenizer tokenizer = new StringTokenizer(fileList, ";");
StringTokenizer tokenizer = new StringTokenizer(fileList, File.pathSeparator);
while (tokenizer.hasMoreTokens()) {
addClassPath(new File(tokenizer.nextToken()));
}
@ -320,6 +320,7 @@ public class Main {
// Sort the jars so that classpath built is consistently in the same
// order. Also allows us to use jar names to control classpath order.
Arrays.sort(files, new Comparator<File>() {
@Override
public int compare(File f1, File f2) {
return f1.getName().compareTo(f2.getName());
}

View File

@ -109,7 +109,14 @@ if [ -z "$ACTIVEMQ_BASE" ] ; then
ACTIVEMQ_BASE="$ACTIVEMQ_HOME"
fi
ACTIVEMQ_CLASSPATH="$ACTIVEMQ_BASE/../lib/"
# Configure user specified classpath here or externally using this variable
if [ -z "$ACTIVEMQ_USER_CLASSPATH" ] ; then
ACTIVEMQ_USER_CLASSPATH=""
fi
# ActiveMQ Classpath configuration
ACTIVEMQ_CLASSPATH="$ACTIVEMQ_BASE/../lib/:$ACTIVEMQ_USER_CLASSPATH"
# Active MQ configuration directory
if [ -z "$ACTIVEMQ_CONF" ] ; then