这是indexloc提供的服务,不要输入任何密码
Skip to content
Jochen Staerk edited this page Dec 21, 2015 · 1 revision

If you embed OpenOffice without start argumens, your users be faced with a First start wizard (if that hadn't been completed) or a crash report (if the previous session was not shut down correctly).

Even worse, OpenOffice will try to use it's quickstarter if -nodefault is not specified - and fail on systems where the OpenOffice Quickstarter is not active.

Fortunately, it's easy to specify those command line options in your configuration:

	HashMap configuration = new HashMap();
			configuration.put(IOfficeApplication.APPLICATION_HOME_KEY,
					ila[0].getHome());
			configuration.put(IOfficeApplication.APPLICATION_TYPE_KEY,
					IOfficeApplication.LOCAL_APPLICATION);
			String[] oooArgs = new String[] { "-nofirststartwizard",
					"-norestore", "-nolockcheck", "-nocrashreport",
					"-nodefault", "-nologo" };
			configuration.put(IOfficeApplication.APPLICATION_ARGUMENTS_KEY,
					oooArgs);

(based on a sample courtesy by Markus Krüger).

Clone this wiki locally