jcscoobyrs 2005/10/10 23:14:03
Modified: modules/core/src/java/org/openejb/server/admin Stop.java
Log:
Updated per David to have new approach for help and examples.
Revision Changes Path
1.4 +5 -4
openejb1/modules/core/src/java/org/openejb/server/admin/Stop.java
Index: Stop.java
===================================================================
RCS file:
/scm/openejb/openejb1/modules/core/src/java/org/openejb/server/admin/Stop.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- Stop.java 16 Jun 2005 22:29:52 -0000 1.3
+++ Stop.java 11 Oct 2005 03:14:03 -0000 1.4
@@ -57,6 +57,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">David Blevins</a>
*/
public class Stop implements org.openejb.client.RequestMethods {
+ private static final String helpBase = "META-INF/org.openejb.cli/";
/**
*
@@ -100,7 +101,7 @@
if (args.length > i+1 ) {
port = Integer.parseInt( args[++i] );
}
- } else if (args[i].equals("-help")){
+ } else if (args[i].equals("--help")){
printHelp();
return;
} else if (args[i].equals("-examples")){
@@ -130,7 +131,7 @@
// Internationalize this
try {
- InputStream in = new URL( "resource:/openejb/stop.txt"
).openConnection().getInputStream();
+ InputStream in =
Thread.currentThread().getContextClassLoader().getResource(helpBase +
"stop.help").openConnection().getInputStream();
int b = in.read();
while (b != -1) {
@@ -155,7 +156,7 @@
// Internationalize this
try {
- InputStream in = new URL( "resource:/openejb/stop-examples.txt"
).openConnection().getInputStream();
+ InputStream in =
Thread.currentThread().getContextClassLoader().getResource(helpBase +
"stop.examples").openConnection().getInputStream();
int b = in.read();
while (b != -1) {