I think the jvm would need to be spawned as a process right? This would not work on iOS and tvOS for example because apps are not allowed to do so (it simply would crash)
AppleTV4/iPhone/iPod/iPad: HowTo find debug logs and everything else which the devs like so much: click here
HowTo setup NFS for Kodi: NFS(wiki)
HowTo configure avahi (zeroconf): Avahi_Zeroconf(wiki)
READ THE IOS FAQ!: iOS FAQ(wiki)