updated communication between c and java. much more to work on.