FakeSMTP icon indicating copy to clipboard operation
FakeSMTP copied to clipboard

when starting in background mode, the welcome banner should not be displayed

Open alexlehm opened this issue 11 years ago • 6 comments
trafficstars

when running the server in background mode, it would be necessary not to display the welcome banner to be able to run tests in a headless mode, e.g. on Jenkins.

I assume the welcome banner uses awt or swing, that will not be available in a server process.

alexlehm avatar Oct 18 '14 09:10 alexlehm

I know this issue is very old. I do not know why I have decided to review it :) Ok, let me summarize: The splash screen is displayed automatically by Java via MANIFEST.MF the help link. I have honestly tested the snapshot (2.1) in Ubuntu Server (no GUI), and Java was quite smart, so it didn't throw any AWT exceptions. So, actually there is no bug, but... If you execute the same server in Windows, you will see the splash screen. The problem is that (according to the help link above) the splash screen is closed when you display any AWT window, or click somewhere. Even if I hide the window via API:

/* main */
SplashScreen splash = SplashScreen.getSplashScreen();
if (splash != null) {
    splash.close();
}

I still see it for half a second. We have several options for the issue:

Vest avatar May 12 '15 13:05 Vest

On Windows 8, when I run FakeSMTP in background mode, the splash screen is displayed. Hovering it shows a loading mouse icon, the splash screen cannot be clicked away. Is this issue related?

image

marcovtwout avatar May 18 '15 07:05 marcovtwout

@marcovtwout this is what I wrote above. Please check the links I have posted. By default, the splash screen is always displayed, if it is specified in the manifest file. On my Windows 7, if I click on the background (desktop).

Vest avatar May 18 '15 07:05 Vest

Not being able to dismiss the splash screen wasn't clear to me from the posts above. That's why I added my observation. ;)

marcovtwout avatar May 18 '15 08:05 marcovtwout

If you have proposals how this should be implemented, I can try to prepare a pull request. Currently the implementation requires less effort.

Vest avatar May 18 '15 08:05 Vest

Pull request #47 closes the splash (as a minor secondary modification), same way that Vest mentions above. Yes after the change it still appears for a fraction of a second but as already mentioned, it's harmless. I think if it gets merged, this issue should be closed.

rdalkire avatar Jun 24 '16 15:06 rdalkire