What does this have to do with UI/Non-UI? This (running jRDC2 as a service) is OS platform dependent. There are already some posts here on the forum on how to run Java applications as a service (Ubuntu and Windows come to mind).
C:\java -version
java version "1.8.0_251"
Java(TM) SE Runtime Environment (build 1.8.0_251-b08)
Java HotSpot(TM) 64-Bit Server VM (build 25.251-b08, mixed mode)