I wrote a program in Java/JavaFX because I needed cross platform support. As I progressed, I needed to do some low level OS networking operations that aren't possible in Java. I started with Runtime.exec(), moved to JNA/JNI, and now I'm worried that maintaining OS compatibility for Java will end up being more work than just porting to a native applications.
What is the best way to do this?
I know GTK+ is supported by *nix and windows so I think I'll use that for my UI. How difficult is it going to be to maintain different versions of my application for each OS? Can you recommend a starting point for writing something that needs to be cross platform but still has low level OS access? I have a lot of Java experience (and a good amount of C++ with OpenGL) but I've never had to care about anything but Linux before.
Alternatively, is there a good way to build raw packets, send ICMP pings, and do other low level networking tasks from Java?