Use webservices, that will solve your problems just fine and be cross platform compatible for you as well. Avoid JNI if possible.

// Json