[jboss-cvs] JBoss Messaging SVN: r6905 - trunk/examples/jms/common/src/org/jboss/jms/example.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed May 20 03:10:55 EDT 2009
Author: ataylor
Date: 2009-05-20 03:10:55 -0400 (Wed, 20 May 2009)
New Revision: 6905
Modified:
trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java
Log:
fixed windows path issue
Modified: trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java
===================================================================
--- trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java 2009-05-20 07:06:38 UTC (rev 6904)
+++ trunk/examples/jms/common/src/org/jboss/jms/example/SpawnedVMSupport.java 2009-05-20 07:10:55 UTC (rev 6905)
@@ -63,6 +63,10 @@
for (String vmarg : vmargs)
{
+ if (System.getProperty("os.name").contains("Windows"))
+ {
+ vmarg = vmarg.replaceAll("/", "\\\\");
+ }
sb.append(vmarg).append(' ');
}
@@ -71,17 +75,22 @@
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").equals("Linux") || System.getProperty("os.name").equals("Mac OS X"))
+ if (System.getProperty("os.name").contains("Windows"))
{
- sb.append("-cp").append(" ").append(classPath).append(" ");
+ sb.append("-cp").append(" \"").append(classPath).append("\" ");
}
else
{
- sb.append("-cp").append(" \"").append(classPath).append("\" ");
+ sb.append("-cp").append(" ").append(classPath).append(" ");
}
+ String libPath = "-Djava.library.path=" + System.getProperty("java.library.path", "./native/bin");
+ if (System.getProperty("os.name").contains("Windows"))
+ {
+ libPath = libPath.replaceAll("/", "\\\\");
+ libPath = "\"" + libPath + "\"";
+ }
+ sb.append("-Djava.library.path=").append(libPath).append(" ");
- sb.append("-Djava.library.path=").append(System.getProperty("java.library.path", "./native/bin")).append(" ");
-
// sb.append("-Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=8000 ");
sb.append(className).append(' ');
@@ -92,7 +101,7 @@
String commandLine = sb.toString();
- log.trace("command line: " + commandLine);
+ log.info("command line: " + commandLine);
Process process = Runtime.getRuntime().exec(commandLine, new String[]{}, new File(configDir));
More information about the jboss-cvs-commits
mailing list