You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by jb...@apache.org on 2006/10/17 01:00:46 UTC
svn commit: r464712 - in
/incubator/tuscany/java/sca/commands/launcher/src/main:
java/org/apache/tuscany/launcher/ resources/org/apache/tuscany/launcher/
Author: jboynes
Date: Mon Oct 16 16:00:45 2006
New Revision: 464712
URL: http://svn.apache.org/viewvc?view=rev&rev=464712
Log:
for TUSCANY-860 print usage when no jar specified
Added:
incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncherBooter.properties (contents, props changed)
- copied, changed from r464371, incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncher.properties
Removed:
incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncher.properties
Modified:
incubator/tuscany/java/sca/commands/launcher/src/main/java/org/apache/tuscany/launcher/MainLauncherBooter.java
Modified: incubator/tuscany/java/sca/commands/launcher/src/main/java/org/apache/tuscany/launcher/MainLauncherBooter.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/commands/launcher/src/main/java/org/apache/tuscany/launcher/MainLauncherBooter.java?view=diff&rev=464712&r1=464711&r2=464712
==============================================================================
--- incubator/tuscany/java/sca/commands/launcher/src/main/java/org/apache/tuscany/launcher/MainLauncherBooter.java (original)
+++ incubator/tuscany/java/sca/commands/launcher/src/main/java/org/apache/tuscany/launcher/MainLauncherBooter.java Mon Oct 16 16:00:45 2006
@@ -48,6 +48,9 @@
* @param args the command line args
*/
public static void main(String[] args) throws Throwable {
+ if (args.length == 0) {
+ usage();
+ }
MainLauncherBooter booter = new MainLauncherBooter();
File installDir = getInstallDirectory();
@@ -90,6 +93,12 @@
}
}
+ private static void usage() {
+ ResourceBundle bundle = ResourceBundle.getBundle(MainLauncherBooter.class.getName());
+ System.err.println(bundle.getString("org.apache.tuscany.launcher.Usage"));
+ System.exit(1);
+ }
+
protected void runApplication(File applicationJar, ClassLoader applicationClassLoader, String[] args)
throws Throwable {
@@ -141,12 +150,6 @@
File jarFile = new File(URI.create(jarLocation));
return new File(jarFile.getParentFile().getParentFile(), "boot");
- }
-
- protected void usage() {
- ResourceBundle bundle = ResourceBundle.getBundle(MainLauncherBooter.class.getName());
- System.err.print(bundle.getString("org.apache.tuscany.launcher.Usage"));
- System.exit(1);
}
protected URL getSystemScdl(ClassLoader bootClassLoader) {
Copied: incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncherBooter.properties (from r464371, incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncher.properties)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncherBooter.properties?view=diff&rev=464712&p1=incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncher.properties&r1=464371&p2=incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncherBooter.properties&r2=464712
==============================================================================
--- incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncher.properties (original)
+++ incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncherBooter.properties Mon Oct 16 16:00:45 2006
@@ -17,8 +17,4 @@
#
# $Rev$ $Date$
#
-# REVIEW: Move to core.launcher
-org.apache.tuscany.launcher.Usage=usage: java [jvm-options] -jar launcher.jar [options] arg...\n\
- where [options] are:\n\
- --classpath <path> set the classpath for loading application classes (required)\n\
- --main <classname> specify the classname to launch (overrides manifest entries on classpath param)\n
+org.apache.tuscany.launcher.Usage=usage: java [jvm-options] -jar launcher.jar <jar> [args...]
Propchange: incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncherBooter.properties
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncherBooter.properties
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/commands/launcher/src/main/resources/org/apache/tuscany/launcher/MainLauncherBooter.properties
------------------------------------------------------------------------------
svn:mime-type = text/plain
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org