We use install4j for our software and we have different languages for our application and for installer too. We are migrating from install4j 5.1.3 to install4j 6.1.6 . During check of installers we've found that "Replacement script for language code" doesn't work on MacOS. For verification I've just built simple installer that returns just "en" in the replacement script. Manual says that Language Selection Dialog should't be shown it that case, but on MacOS it is shown. With log output there is ClassNotFoundException:
[ERROR] java.lang.ClassNotFoundException: com.install4j.script.I4jScript_Internal_7
java.lang.ClassNotFoundException: com.install4j.script.I4jScript_Internal_7
at java.net.URLClassLoader.findClass(URLClassLoader.java:381)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at com.install4j.runtime.installer.helper.Install4jClassLoader.loadClass(Install4jClassLoader.java:81)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:348)
at com.install4j.runtime.installer.ContextImpl.runScript(ContextImpl.java:187)
at com.install4j.runtime.installer.ContextImpl.runScript(ContextImpl.java:182)
at com.install4j.runtime.installer.controller.LanguageSelector.initLanguage(LanguageSelector.java:45)
at com.install4j.runtime.installer.controller.Controller.start(Controller.java:60)
at com.install4j.runtime.installer.Installer.runInProcess(Installer.java:59)
at com.install4j.runtime.installer.Installer.main(Installer.java:46)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at com.exe4j.runtime.LauncherEngine.launch(LauncherEngine.java:65)
at com.install4j.runtime.launcher.MacLauncher.main(MacLauncher.java:67)
However, the I4jScript_Internal_7 class is contained in user.jar in archive and it is our script, but for some reason install4j couldn't load it.
configurationObject.setText("111");in label initializing script - and label's text became '111'. Also I've build the test project on my colleague's PC - the result is the same. Please see archive drive.google.com/file/d/1weGcFXRoKuBBiNxsOekNjpR7DZcu2wzH/view with dmg and install4j project. - Dmitrii Kopylovreturn "en";in "Replacement script for language code") happens for 6.1.3, 6.1.6 and 7.0.4 . I checked with the project from the config above (from Google Drive). - Dmitrii Kopylov