title: Is it possible to make a Java JNI which calls jdbc?
body: <p>I am new to jni and very confused if I can use jni to achieve what I need done. I want to make a java api what will use jdbc to update database, but this particular api will be called from C++ program. </p>
  
  <p>So I think I probably should write jni code which access the database via jdbc (is that even possible?), create C++ code and generate dll so other C++ programs can just call the dll to update database. Is this all possible? If so, how do I really call jdbc in jni? 
  If this dll is finally made, can Fortran call it as well?</p>
  
  <p>My other thought is maybe I should make a regular java program to update the database, then use say ikvm to wrap the java class into C++ dll?</p>
  
  <p>The thing is I have to use access database using Java. Our C++ programs will not access database at all, and it would be better if this java api can be accessed via system call. </p>
  
  <p>Or is there any better way to do it?</p>
  
  <p>I hope I explained it well. I am not all familiar with what I am assigned here and cannot find much relevant reference.</p>
  
  <p>Thank you so much!!</p>
  
  <p><strong>UPDATED:</strong> 
  The problem is not all computers have C++ postgresql driver installed but they do have Java postgresql driver installed. We don't want to force everyone to install the C++ db driver and no major changes in those C++ program will be made. So it will make sense to come up something in Java to access database. The java system service (preferred, like dll?) /API basically is called to record start time and end time of a C++ program. C++ program will make a <strong>"function" call (with pass-in parameter and returned value)</strong> to this system service/Java API to record start/end time. </p>