B4J Question Dose B4J suport Service Module ?


Licensed User
Longtime User
In B4J you can treat any code module as if it is a service. It can run in the background or foreground.

Does it need special care when writing it, so Windows can not kill it, and can start at boot? in other words, does a service n b4j has all the (features) of Android service?

I am asking this question because I want to use it as email server, and then have it share the received email with other running Windows applications.
Upvote 0


Well-Known Member
Licensed User
Longtime User

The lifecycle of a B4J application is different than that from a B4A application.

On Android the OS can easily kill processes when the OS decides it is needed. For Java applications (created by B4J) once an application is started the OS will not kill it by itself, so you can rest assured that when an application is started it will keep running until it is killed explicitly.

I don't think B4J can create "service" applications (as in Windows services) as such type of applications do not exist on other OS's (Linux for example): in Linux for example you can just start an application as a cronjob (or @reboot).
Upvote 0