[jboss-cvs] JBoss Messaging SVN: r7041 - trunk/examples/common/src/org/jboss/common/example.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue May 26 14:49:30 EDT 2009
Author: timfox
Date: 2009-05-26 14:49:30 -0400 (Tue, 26 May 2009)
New Revision: 7041
Modified:
trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java
Log:
small tweak
Modified: trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java
===================================================================
--- trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java 2009-05-26 17:52:48 UTC (rev 7040)
+++ trunk/examples/common/src/org/jboss/common/example/SpawnedVMSupport.java 2009-05-26 18:49:30 UTC (rev 7041)
@@ -86,7 +86,9 @@
classPath = classPath + pathSeparater + ".";
// System.out.println("classPath = " + classPath);
// I guess it'd be simpler to check if the OS is Windows...
- if (System.getProperty("os.name").contains("Windows"))
+
+ boolean isWindows = System.getProperty("os.name").contains("Windows");
+ if (isWindows)
{
sb.append("-cp").append(" \"").append(classPath).append("\" ");
}
@@ -94,8 +96,10 @@
{
sb.append("-cp").append(" ").append(classPath).append(" ");
}
+
+ //FIXME - not good to assume path separator
String libPath = "-Djava.library.path=" + System.getProperty("java.library.path", "./native/bin");
- if (System.getProperty("os.name").contains("Windows"))
+ if (isWindows)
{
libPath = libPath.replaceAll("/", "\\\\");
libPath = "\"" + libPath + "\"";
More information about the jboss-cvs-commits
mailing list