Author: doogie
Date: Sat Apr 18 01:07:54 2009
New Revision: 766193
URL:
http://svn.apache.org/viewvc?rev=766193&view=revLog:
Add a feature for setting any system property by reading from a file.
Modified:
ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
Modified: ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java
URL:
http://svn.apache.org/viewvc/ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java?rev=766193&r1=766192&r2=766193&view=diff==============================================================================
--- ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java (original)
+++ ofbiz/trunk/framework/start/src/org/ofbiz/base/start/Start.java Sat Apr 18 01:07:54 2009
@@ -373,6 +373,14 @@
String firstArg = args.length > 0 ? args[0] : "";
Start start = new Start();
+ String globalSystemPropsFileName = System.getProperty("ofbiz.system.props");
+ if (globalSystemPropsFileName != null) {
+ try {
+ System.getProperties().load(new FileInputStream(globalSystemPropsFileName));
+ } catch (IOException e) {
+ throw (IOException) new IOException("Couldn't load global system props").initCause(e);
+ }
+ }
if (firstArg.equals("-help") || firstArg.equals("-?")) {
System.out.println("");
System.out.println("Usage: java -jar ofbiz.jar [command] [arguments]");