dirkv 2004/03/21 11:12:26
Modified: launcher/src/java/org/apache/commons/launcher Launcher.java
Log:
Patch to use the Launcher from a class running in a WAS 5.0 Web App.
Protocol returned by resource.getProtocol() is "wsjar"
Patch by Marcus Mosttler (commons-dev 8/3/2004)
Revision Changes Path
1.6 +6 -1
jakarta-commons/launcher/src/java/org/apache/commons/launcher/Launcher.java
Index: Launcher.java
===================================================================
RCS file:
/home/cvs/jakarta-commons/launcher/src/java/org/apache/commons/launcher/Launcher.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- Launcher.java 28 Feb 2004 11:52:20 -0000 1.5
+++ Launcher.java 21 Mar 2004 19:12:26 -0000 1.6
@@ -533,7 +533,12 @@
throw new
IOException(Launcher.getLocalizedString("bootstrap.file.not.found") + ": " +
Launcher.class.getName());
String resourcePath = null;
String embeddedClassName = null;
- boolean isJar = "jar".equals(resource.getProtocol()) ? true : false;
+ boolean isJar = false;
+ String protocol = resource.getProtocol();
+ if ((protocol != null) &&
+ (protocol.indexOf("jar") >= 0)) {
+ isJar = true;
+ }
if (isJar) {
resourcePath = URLDecoder.decode(resource.getFile());
embeddedClassName = "!" + classResourceName;
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]