if u know very well how to call C code from java and getting an error then itz a problem with ur C code.. Post ur code nd we will try to sort u out...on the other hand, from the bits and pieces of informations provided by u i can say that "something wrong is thr with ur file handling section" ..check the existence of the file path which u r working with...