I think that is just the way windows remoting works - when you log out it kills any processes you have created (similar to when you log out of a remote desktop window, rather than just disconnect).
It is definitely possible to get your java jar program to run if you set it up to run as a windows service.
There is probably more than one way to do this but one way is to install nssm - downloadable from here:
https://nssm.cc/download and then use win_nssm module to set up your java program to run as a service. Depending on what your java jar does it may need to run as a specific user.
I hope this helps.
Jon