Migrating to install4j 7
In nearly all cases, migrating to install4j 7 just means opening and saving your project with the install4j 7 IDE. Nevertheless, there are some considerations with respect to backwards compatibility and a couple of behavioral changes.
- The minimum supported Java version is now Java 7 up from Java 6 for install4j 6.
This also means that the old Java 6 Apple JRE is no longer available as a separate type on the Bundled "JRE" step of the
macOS media wizard. The launcher runtime still supports Java 6 and you can set the compiler variable
sys.ext.forceMinJavaVersion
totrue
in order to allow "1.6" as a minimum version. Note that no classes in the API can be called from Java 6. - The "native splash screen" feature for Windows has been removed. This went back to the pre-Java 6 days when Java did not offer splash screen functionality and was missing several important features. If you had this feature selected for one of your launchers, it now uses the regular Java splash screen
- When a rollback terminates at a rollback barrier, the exit code of an installer application is now 0. To restore the old exit code of 1, you can set the "Exit code" child property of the "Rollback barrier" property to 1
- In the "Key validation expression" script property of text components, the "keyCode" parameter has been removed. It was always 0 before and did not serve a useful purpose.
-
If you develop your own screens with the API, the methods
isShowIndex
,hasTitlePanel
,hasDefaultInsets
andhasDefaultButtons
have been removed from the interfacecom.install4j.api.screens.Screen
and so your existing implementation of these methods will no longer be called by install4j. This functionality is now covered by styles which are much more flexible than the previous limited styling capabilities. - In the API, methods with Object[] arguments for variable parameter lists have been converted to varargs. This should not cause source or binary incompatibilities but may show warnings in your code if you call such methods.
- The "Create a quick launch icon" action has been removed with no replacement. The last OS where it had any effect was Windows Vista.
- If you have not set a maximum Java version, and do not use a bundled JRE, any installed Java 9 JRE will be used. Java 9 has backward compatibility issues that may prevent your application from working unless you explicitly support it. Consider limiting the maximum Java version to "1.8" in that case.
- If the "Request privileges" action fails, an installation directory in the user home directory is set. To restore the old behavior of keeping the default installation directory deselect the "Fall back to user specific installation directory" property on the "Request privileges" action.
-
With install4j 7, you cannot use the deprecated
com.apple.eawt.Application.Application.getApplication().addApplicationListener(...)
in the macOS EAWT API anymore, you have to use the new API methods, for exampleApplication.getApplication().setQuitHandler((quitEvent, quitResponse) -> { quitResponse.cancelQuit(); // TODO add your code });
for the quit handler.
If you notice anything else, please let us know!
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