• Post Reply Bookmark Topic Watch Topic
  • New Topic

c object files  RSS feed

 
Bill Boyle
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Has anyone used java with c object files. I know how to call a c library file (dll) with the java native interface, but I have a bunch of c routines in object files and I need to call them from java.
Any ideas?
 
Ernest Friedman-Hill
author and iconoclast
Sheriff
Posts: 24215
37
Chrome Eclipse IDE Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Short of putting them into a DLL, along with native methods to wrap them -- no. But then, calling functions from bare object files, dynamically, is not something you can (easily) do from a C program, either.
To put this another way: write some C code to call arbitrary functions from .o files, dynamically. Then write a JNI wrapper for it, and put that wrapper in a DLL.
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!