Help:how to use the Wildfire''s API:the class "ServerStarter"?

Hi,
I want to start the Wildfire server though a small program,can I? the code is:

import org.jivesoftware.wildfire.starter.ServerStarter;
public class teststart { public static void main(String [] args) {
new ServerStarter().start(); }
}

But I met this error:

Could not locate home

java.io.FileNotFoundException

at org.jivesoftware.wildfire.XMPPServer.locateWildfire(XMPPServer.java:735)

at org.jivesoftware.wildfire.XMPPServer.initialize(XMPPServer.java:283)

at org.jivesoftware.wildfire.XMPPServer.start(XMPPServer.java:363)

at org.jivesoftware.wildfire.XMPPServer.<init>(XMPPServer.java:145)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)

at java.lang.Class.newInstance(Class.java:303)

at org.jivesoftware.wildfire.starter.ServerStarter.start(ServerStarter.java:88)

at src.teststart.teststart.main(teststart.java:35)

Critical Error! The home directory has not been configured, which will prevent the application from working correctly.

ERROR 11564 ():

java.io.FileNotFoundException: XML properties file does not exist: wildfire.xml

at org.jivesoftware.util.XMLProperties.<init>(XMLProperties.java:97)

at org.jivesoftware.util.XMLProperties.<init>(XMLProperties.java:59)

at org.jivesoftware.util.JiveGlobals.loadSetupProperties(JiveGlobals.java:749)

at org.jivesoftware.util.JiveGlobals.getHomeDirectory(JiveGlobals.java:228)

at org.jivesoftware.util.Log.initLog(Log.java:78)

at org.jivesoftware.util.Log.<clinit>(Log.java:64)

at org.jivesoftware.wildfire.XMPPServer.start(XMPPServer.java:403)

at org.jivesoftware.wildfire.XMPPServer.<init>(XMPPServer.java:145)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)

at java.lang.Class.newInstance(Class.java:303)

at org.jivesoftware.wildfire.starter.ServerStarter.start(ServerStarter.java:88)

at src.teststart.teststart.main(teststart.java:35)

2006.08.25 09:47:09 Error occurred opening log file: LogName was null - WildfireHome not set?

2006.08.25 09:47:10

[

|org.jivesoftware.wildfire.XMPPServer.start(XMPPServer.java:403)]

java.io.FileNotFoundException

at org.jivesoftware.wildfire.XMPPServer.locateWildfire(XMPPServer.java:735)

at org.jivesoftware.wildfire.XMPPServer.initialize(XMPPServer.java:283)

at org.jivesoftware.wildfire.XMPPServer.start(XMPPServer.java:363)

at org.jivesoftware.wildfire.XMPPServer.<init>(XMPPServer.java:145)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)

at java.lang.Class.newInstance(Class.java:303)

at org.jivesoftware.wildfire.starter.ServerStarter.start(ServerStarter.java:88)

at src.teststart.teststart.main(teststart.java:35)

java.util.MissingResourceException: Can’'t find bundle for base name wildfire_i18n, locale zh_CN

at java.util.ResourceBundle.throwMissingResourceException(ResourceBundle.java:836)

at java.util.ResourceBundle.getBundleImpl(ResourceBundle.java:805)

at java.util.ResourceBundle.getBundle(ResourceBundle.java:576)

at org.jivesoftware.util.LocaleUtils.getLocalizedString(LocaleUtils.java:351)

at org.jivesoftware.wildfire.XMPPServer.start(XMPPServer.java:404)

at org.jivesoftware.wildfire.XMPPServer.<init>(XMPPServer.java:145)

at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)

at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessor Impl.java:39)

at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructor AccessorImpl.java:27)

at java.lang.reflect.Constructor.newInstance(Constructor.java:494)

at java.lang.Class.newInstance0(Class.java:350)

at java.lang.Class.newInstance(Class.java:303)

at org.jivesoftware.wildfire.starter.ServerStarter.start(ServerStarter.java:88)

at src.teststart.teststart.main(teststart.java:35)

What’'s the matter however? What should I do?
I really want to get your help!
Thanks! Qun

Critical Error! The home directory has not been configured,

which will prevent the application from working correctly.

  1. Try to define wildfireHome java system property. To do that run your small program like

java -DwildfireHome=/path/to/wildfire MyServerStarter

  1. Try to run your program from wildfire’'s installation bin directory

Thank you very much!

My problem has been resolved.There is indeed something wrong with the path!

Thanks for your guide!

Qun