Migrating to install4j 8
In nearly all cases, migrating to install4j 8 just means opening and saving your project with the install4j 8 IDE. Nevertheless, there are some considerations with respect to backwards compatibility and a couple of behavioral changes.
-
The unattended installer does not ignore file installation failures anymore but fails at the first file installation
failure. To get the old behavior, start the installer with the
-nofilefailures
argument. To permanently set this mode, add-Dinstall4j.noFileFailures=true
to the "VM parameters" property of the installer. -
When using the VM parameters
-Dinstall4j.alternativeLogFile=<path>
and its new alias-Dinstallj4.log=<path>
now imply-Dinstall4j.keepLog=true
, meaning that the log file is no longer deleted in case of a successful execution of the installer application. -
The default file name of the error log for Windows installers has changed from
error.log
to${compiler:sys.mediaFileName}_error.log
. You can restore the old file name with the new "Log file for stderr" property of the installer. -
In bean properties with an array type, installer variables with collection values are expanded as separate array
elements. Previously this was only implemented if the installer variables had array values. In the API, this new
behavior affects the
AbstractBean.replaceVariables(...)
methods with array parameters. If you rely on thetoString()
replacement of collections, you have to change the types of the related installer variables. -
Variable names for all built-in variable systems can no longer contain the character sequence
?:
which is now used for specifying default values for missing variables. FormEnvironment.getId(...)
now returns the display ID of the form component rather than the automatic ID. If you were checking for an explicit automatic ID and also defined a custom ID for a form component, that code will now fail.- The "Read text from file" action will now fail if an error occurred. Previously it always succeeded.
-
The compiler variable
sys.platform
now contains the valuewindows-x32
for 32-bit Windows media files instead ofwindows
. For 64-bit Windows media files it remainswindows-x64
. - The "Customize project defaults->Installer custom script" step of the Unix/Linux GUI installer media wizard has been removed. The custom script is now configured on the installer in the "Installer->Screens & Actions" step. The simple case where there is only one Unix/Linux GUI installer is migrated correctly. However, if you used different customizations for different Unix/Linux GUI installers, the migration will be incomplete and you have to solve it with compiler variables.
-
For Linux/Unix installers, the umask is now set to 0022 to allow execution by all users. This can be changed by setting
the compiler variable
sys.ext.installerUmask
to another mask value or tofalse
to prevent executing anyumask
command in the installer script.
Blog Archive
September/5
2022/10
Customizing telemetries in JProfilerWorking with probe events in JProfilerEnhanced JFR snapshot analysis with JProfilerRecording JFR snapshots with JProfilerGarbage collector analysis in JProfiler
March/1
January/1
December/2
November/3
2021/2
2020/1
2019/1
2018/3
2017/5
2016/1
2015/10
Profiling a Netty serverUsing flame graphs when profiling Java applicationsUsing sunburst diagrams for understanding Java memory consumption
October/1
September/1
August/2
July/1
November/5
2014/3
2013/3
2012/5
2011/13
Finding JDBC connection leaksRemote profiling through an SSH tunnelCollapsing recursions in the call treeAnalyzing incoming and outgoing calls of a methodAnalyzing specific parts of the call tree
June/5
December/1
October/2
September/5
2010/8
2009/14
Filtering in the reference view of the heap walkerHeap walker graph: Finding paths between selected instancesInspections in the heap walkerCreating a custom probeUsing the "Run interceptor script" trigger action
August/4
CPU profiling: Sampling and instrumentationProbes overviewAnalyzing long-running AWT events with JProfilerRequest tracking
February/1