I'm a Java fan, and lately, I'm a Groovy lover. However, it's well known there are limitations in high-level languages such as Java and scripting languages, Groovy for example, when dealing with low level issues. Some people say "C is a high abstraction of the assembler code". In fact, one step during compilation of C programs is to translate them in assembly code (gcc -S <your_program>.c)
As consequence, the Java developers have developed JNI (Java Native Interface) framework. It allows the interaction between Java and C code. However, to develop JNI components can be a daunting task.
SWIG is a software development tool connecting C and C++ components with scripting languages such as: Perl, PHP, Python, Tcl and Ruby. Besides, it supports interaction with non-scripting languages such as: C#, Common Lisp, Java, Lua, Modula-3, OCAML, Octave and R. Impressive ah!
Take care, and happy weekend!