Java is supposed to be \"write once, run anywhere\" and it really can be, but in some cases it turns into \"write once, debug everywhere\".
What are the most common
Using JNI is something that should be looked into. Providing the native library for every target platform can reduce this problem.