Migrating to install4j 9
In nearly all cases, migrating to install4j 9 just means opening and saving your project with the install4j 9 IDE. Nevertheless, there are some considerations with respect to backwards compatibility and a couple of behavioral changes.
- The minimum Java version for the install4j runtime is now Java 1.8. Java 1.7 is no longer supported.
- The install4j compiler and IDE now require at least Java 11. This is only relevant on Linux and Unix where no JRE is bundled.
-
"Install files" action: The "Update bundled" JRE property has been removed. A bundled JREs is now always updated if the
update installer also includes a bundled JRE. The ability to switch this off offers no benefit and has the potential to
create severe problems during sequential upgrades. If you had this property selected, you can restore the previous
behavior by defining the VM parameter
-Dinstall4j.preventJreBundleUpdate=true
in the installer. - "HTTP request" action: In previous versions, if an error occurred, the response code variable and the response header variables were not set. This error has been corrected in install4j 9, but it changes the semantics of the installer variables.
-
The installer variable
sys.appdataDir
was previously undefined on Unix, it now returns the value of the environment variableXDG_DATA_HOME
(~/.local/share
) on Unix. -
Shared JREs (Windows and Unix) now have a sharing ID. This has become necessary because there is no universal definition
of a JRE anymore so the scope of sharing has to be restricted. Consequently, shared JREs are now installed in different
locations than before. Also, the user-specific root directories have changed to
~/.local/share/i4j_jres
on Unix and%APPDATA%\Local\Programs\Common\i4j_jres
on Windows. Shared JREs are now preferred to public JREs on Unix. - The "Execute launcher" action always executed the selected launcher without elevation. This does not work for launchers that require privileges themselves. Since install4j 9, the action respects the "Action elevation type" property of the action. This changes the behavior of the action if you have changed the "Action elevation type" property from its default value of "Do not elevate" to another property value.
-
The auto-update integration for background update downloaders in the launcher wizard behaves differently if the
"Unattended mode with progress dialog" mode is selected: It now shows errors and alerts in the update installer where
previously any error would lead to a silent failure. If this change is not acceptable for you, you can add the VM
parameter
-Dinstall4j.noAlerts=true
to the "VM parameters" property of the installer. -
Installer applications that have not been started in-process by launchers now set the system property
jdk.lang.Process.allowAmbiguousCommands=false
to avoid cmd.exe injections. In unattended and console mode, installers applications already behaved that way because they use a security manager. Some quoting strategies or arguments that worked before might stop working in GUI mode because of that change. To revert to the previous behavior, set the VM parameter -Djdk.lang.Process.allowAmbiguousCommands=true
for the installer application. -
The JRE version cache on Linux/Unix is now located in
.cache/install4j/jres
instead of the file~/.install4j
. -
Config files, cached files and pre-crated JRE bundles have new platform-specific locations instead of being stored in
~/.install4j<version>
. On Windows, all directories are located below%LOCALAPPDATA%/install4j/v<version>
. On macOS,~/Library/Application Support/install4j/v<version>
is used for config files as well as pre-created JRE bundles and~/Library/Caches/install4j/v<version>
is used for cached files. On Linux and Unix,.config/install4j/v<version>
is used for config files,.caches/install4j/v<version>
for caches and.local/share/install4j/v<version>
for pre-created JRE bundles. The environment variablesXDG_CONFIG_HOME
,XDG_CACHE_HOME
andXDG_DATA_HOME
modify the roots of these directories, respectively. - In previous versions, Linux/Unix installers created the installation directory with the default umask. Since install4j 9, the default Unix directory mode configured in the "Files->File Options" view or the overridden mode configured for the "Installation directory" node in the distribution tree is used.
Blog Archive
April/3
2024/5
2023/7
Bringing JProfiler to VS Code with Kotlin Multi-PlatformCaching auto-provisioned install4j distributions in CI pipelinesCross-platform JRE bundle creation under threat from JEP 493
January/1
September/5
2022/10
Garbage collector analysis in JProfilerRecording JFR snapshots with JProfilerEnhanced JFR snapshot analysis with JProfilerWorking with probe events in JProfilerCustomizing telemetries in JProfiler
March/1
January/1
December/2
November/3
2021/2
2020/1
2019/1
2018/3
2017/5
2016/1
2015/10
Using sunburst diagrams for understanding Java memory consumptionUsing flame graphs when profiling Java applicationsProfiling a Netty server
October/1
September/1
August/2
July/1
November/5
2014/3
2013/3
2012/5
2011/13
Analyzing specific parts of the call treeAnalyzing incoming and outgoing calls of a methodCollapsing recursions in the call treeRemote profiling through an SSH tunnelFinding JDBC connection leaks
June/5
December/1
October/2
September/5
2010/8
2009/14
Using the "Run interceptor script" trigger actionCreating a custom probeInspections in the heap walkerHeap walker graph: Finding paths between selected instancesFiltering in the reference view of the heap walker
August/4
Request trackingAnalyzing long-running AWT events with JProfilerProbes overviewCPU profiling: Sampling and instrumentation
February/1