depends on the target platform.
it is obvious that for the microcontroller in JAVA is not pprogramming, there is only S. where more resources and wider choice. You can WITH#, JAVA, C...
If you want to provide a link between such dissimilar systems, it is best to deal with it BlackBox
which specification generates all the necessary source code for Protocol processing. Even the discussion here.