Development Sneak Peek: Dark Mode and HiDPI

A system-wide dark mode is coming to both macOS and Windows. That’s why we’re working on a dark mode for JProfiler as well. Based on the excellent Darcula Look and Feel from our friends at JetBrains, JProfiler will soon fit into this new world of dark background colors:

 

 

Moreover, support for fractional HiDPI is coming for Windows. If you are using a 4K monitor, you will be happy to hear that the blurry upscaled UI will be a thing of the past. This is not only true for dark mode: We will also be using the light look and feel from IntelliJ IDEA together with the JetBrains Runtime in order to provide the best experience for high screen resolutions. The light mode will be the new default look and feel for JProfiler.

 

 

Stricter time-stamp validation on macOS 10.14

Today we released an install4j emergency release for macOS 10.14 that fixes a problem with code signing. Previous versions of install4j used time stamp validation during code-signing in such a way that it’s no longer recognized by macOS 10.14.

Whenever code signatures are invalid, macOS does not report any specific errors, but just informs the user that the archive is damaged and suggests to move it to the trash, like this:

If you use install4j for deploying to macOS, you probably do use code-signing, so we highly recommend to update to install4j 7.0.6 to avoid problems for users on macOS 10.14.

As an added benefit, the new release can scale splash screens under fractional HiDPI on Windows, so they no longer appear to be to small.

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 to true 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 and hasDefaultButtons have been removed from the interface com.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 example

    Application.getApplication().setQuitHandler((quitEvent, quitResponse) -> {
    quitResponse.cancelQuit();
    // TODO add your code
    });

    for the quit handler.

If you notice anything else, please let us know!

JProfiler’s integration into IntelliJ IDEA

This screencast shows the JProfiler plugin for IntelliJ IDEA. A run configuration is profiled, source code navigation is discussed and the call graph data display in the IDE is shown.

Finding a memory leak with JProfiler

This screencast explains a basic strategy for solving memory leaks with JProfiler.

There is an older version of this screencast from 2009 that is not accurate for the heap walker anymore but that shows other useful features in JProfiler.

Complexity analysis in JProfiler

Complexity analysis in JProfiler is a tool for experimentally determining the Big-O behavior of algorithms based on the execution times of single selected methods. A bubble chart with curve fits of common complexities visualizes the results of the analysis.

Zero-configuration remote attach

This screen cast shows how to attach to a remote JVM with zero configuration on the remote side. The only requirement is an SSH connection to the remote machine. Remote JVMs are listed in the JProfiler UI and a JVM can be selected for profiling.

Comparing install4j to other deployment solutions

Samuel Ruggieri from Voyager Games has written an interesting article comparing install4j against Java Web Start and other installer builders. His conclusion is this:

“At the end of this adventure, I have another experience that demonstrates the old adage that it’s cheaper to buy software than to build it. In this case, it’s cheaper and better. Software engineer hours are expensive, and for a non-trivial Java application, you’ll burn scores of them if you try to build a custom deployment and auto-update solution. At the end of that development, whatever you’ve built will almost certainly be inferior to what install4j can give you with a bare minimum of expense, both in terms of time and effort.”

If you’re thinking about comparing different deployment solutions for your Java application, maybe his article can provide some shortcuts.

Analyzing specific parts of the call tree

This screen cast shows how the “Set root” action is used to analyze a specific part of your code. The “Set root” action in the call tree view is used to select the call stack of interest. The hot spot view and the call graph then only show data for the selected part of the call tree.

Analyzing incoming and outgoing calls of a method

This screen cast shows how to use the call tree analyses to analyze both the cumulated outgoing calls of all top-level invocations of a selected method as well as to calculate the back traces of all its invocations. The results of the analyses are compared with the call graph that shows a combined view of incoming and outgoing calls.