Author: doogie
Date: Sat Apr 18 03:20:32 2009
New Revision: 766207
URL:
http://svn.apache.org/viewvc?rev=766207&view=revLog:
Move ofbiz.system.props handling from main() to init(); the former
calls the latter, but when this class is run underneath jsvc, main is
never called, only init(). So, the system properties were never
loaded.
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=766207&r1=766206&r2=766207&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 03:20:32 2009
@@ -60,6 +60,14 @@
private static final double REQUIRED_JDK = 1.5;
public void init(String[] args, boolean fullInit) throws IOException {
+ 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);
+ }
+ }
String firstArg = args.length > 0 ? args[0] : "";
String cfgFile = Start.getConfigFileName(firstArg);
@@ -373,14 +381,6 @@
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]");