Reputation: 325
If a user with a special character in the username (e.g. username!) launches the installer generated using install4j, it fails to start with the following error:
[ERROR] Exception during instantiation of bean ID installer [ERROR] com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException: Could not load the propery file 'output_xml.properties' for output method 'xml' (check CLASSPATH) com.sun.org.apache.xml.internal.serializer.utils.WrappedRuntimeException: Could not load the propery file 'output_xml.properties' for output method 'xml' (check CLASSPATH) at com.sun.org.apache.xml.internal.serializer.OutputPropertiesFactory.getDefaultMethodProperties(Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.setDefaults(Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.createOutputProperties(Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.(Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerImpl.(Unknown Source) at com.sun.org.apache.xalan.internal.xsltc.trax.TransformerFactoryImpl.newTransformer(Unknown Source) at com.install4j.runtime.installer.helper.XmlHelper.getString(Unknown Source) at com.install4j.runtime.installer.config.AbstractBeanConfig.instantiateBean(Unknown Source) at com.install4j.runtime.installer.config.ApplicationBeanConfig.getOrInstantiateApplication(Unknown Source) at com.install4j.runtime.installer.config.InstallerConfig.getApplicationById(Unknown Source) at com.install4j.runtime.installer.config.InstallerConfig.setCurrentApplicationId(Unknown Source) at com.install4j.runtime.installer.Installer.runInProcess(Unknown Source) at com.install4j.runtime.installer.Installer.main(Unknown Source) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) at java.lang.reflect.Method.invoke(Unknown Source) at com.exe4j.runtime.LauncherEngine.launch(Unknown Source) at com.exe4j.runtime.WinLauncher.main(Unknown Source) at com.install4j.runtime.launcher.WinLauncher.main(Unknown Source)
Is there a way to address this issue?
thanks Parag Thakur
Upvotes: 2
Views: 1026
Reputation: 387
It's not just the JRE that doesn't like being in a path with an exclamation mark; the problem is that Resource Bundles won't load from locations with an exclamation mark in the path.
The solution I have found is to first make sure you have an appropriate JRE installed, then run your installer with the -manual
switch, in order to prevent the unpacking and use of the bundled JRE.
Here are the detailed instructions I gave to my tech support staff:
Install an appropriate JRE (32 or 64-bit, depending on what the installer expects)
Right-click the downloaded FastDraw installer, and select Create Shortcut (The shortcut will be in the same location as the installer file)
Right-click the shortcut, and select Properties
Add -manual
to the Target, after the closing "
(make sure to leave a space before the option); click OK to save it.
Double-click the shortcut to launch the installer
When prompted that the JRE cannot be found, click Locate, and browse to C:\Program Files (x86)\Java\jre1.8.0_45\bin\java.exe
(substitute the actual installed version of course.) The installer and the installed program will then use that JRE instead of trying to install one.
Make sure the program is installed in a location which does not include the exclamation mark, or the installed program may encounter the same problem as the installer.
Upvotes: 0
Reputation: 48015
The JRE does not like to be in a path with an exclamation mark. A bundled JRE would be extracted to the %TEMP% directory which in this case would contain an exclamation mark. The only workaround is not to use a bundled JRE for this case.
Upvotes: 1