Permalink
Browse files

provide some explanation for java -jar rails.war (without -S)

  • Loading branch information...
1 parent d990414 commit 509b71cfb0e625f738bff0e59fadb206937bbab3 @kares kares committed Dec 28, 2012
Showing with 13 additions and 3 deletions.
  1. +13 −3 ext/WarMain.java
  2. BIN lib/warbler_jar.jar
View
@@ -8,6 +8,7 @@
import java.lang.reflect.Method;
import java.io.InputStream;
import java.io.File;
+import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.net.URI;
import java.net.URLClassLoader;
@@ -255,9 +256,18 @@ protected String locateExecutableScript() {
@Override
protected int start() throws Exception {
- if (executable == null) {
- URL server = extractWebserver();
- launchWebServer(server);
+ if ( executable == null ) {
+ try {
+ URL server = extractWebserver();
+ launchWebServer(server);
+ }
+ catch (FileNotFoundException e) {
+ if ( e.getMessage().indexOf("WEB-INF/webserver.jar") > -1 ) {
+ System.out.println("specify the -S argument followed by the bin file to run e.g. `java -jar rails.war -S rake -T` ...");
+ System.out.println("(or if you'd like your .war file to start a web server package it using `warbler executable war`)");
+ }
+ throw e;
+ }
return 0;
}
else {
View
Binary file not shown.

0 comments on commit 509b71c

Please sign in to comment.