Maybe you should read up on the java native interface (JNI). It allows you to call native code (compiled C, C++, etc). This might be more like what you want.