0

Application Architechure

I have a Windows application written in Java. On application startup, it runs a native image of the Spring Boot Application (Because otherwise, spring boot takes 15 to 20 secs to start) using ProcessBuilder and talks to the Spring boot application using REST API.

I have packaged the application using Jpackage with custom Java runtime generated using Jlink to generate an MSI package.

Problem

When the client tries to run the application for the first time a Windows firewall popup comes up like this:-

Windows Firewall popup

This results in a poor user experience and creates doubt in the user's mind.

I researched this topic and it showed that this happens when an application needs to talk to other devices on the local network which my application doesn't need. So I set the server.address property of the spring boot application to 127.0.0.1, equivalent to localhost so the application will only listen to requests on the same device.

This solved my problem. My application no longer generates this Windows firewall popup when launched directly (the Spring boot application) or from the Java application jar from the command line.

But this problem persists when the application is launched using the exe generated from the MSI package.

Now, what can be done to remove this issue? Do I need to add specific configurations in the MSI or the exe. Or do I need to run a Windows command to inform Windows that the application listens on localhost.

Because somehow Windows is not able to recognise that the underlining spring boot application launched using ProcessBuilder is listening on localhost only.

Yash garg
  • 53
  • 1
  • 7

0 Answers0