Code, Strings, and Keys

    • About Thomas Powell
    • Account
    • It’s been [0] days since [program] last updated
    • Login
    • Password Reset
    • Pianist / Accompanist / Music Director Resume
    • Reading List 2025
    • Register
    • Running Gear – Shoes, Treadmill, and Bandages
    • Site Map
Illustration of a bird flying.
  • Passing an object including java Strings to a C library using JNI.

    Main.java, the class which calls the C function, passing the WebSiteVisit object /**** @author thomas*/public class Main {private native void nativePrintObject(WebSiteVisit wsv);/** Creates a new instance of Main */public Main() {}static { System.load(“/home/thomas/testlib/HelloWorldNative/dist/HelloWorldNative.so”);}/** * @param args the command line arguments */public static void main(String[] args) { Main me = new Main(); WebSiteVisit a, b; a…

    February 10, 2007
  • Passing an object including java Strings to a C library.

    Main.java, the class which calls the C function, passing the WebSiteVisit object /**** @author thomas*/public class Main { private native void nativePrintObject(WebSiteVisit wsv); /** Creates a new instance of Main */ public Main() { } static { System.load(“/home/thomas/testlib/HelloWorldNative/dist/HelloWorldNative.so”); } /** * @param args the command line arguments */ public static void main(String[] args) { Main…

    February 10, 2007
  • Java Native Interface – setting and retrieving object fields

    My reference: Java Native Interface This table was specifically handy: Java Type JNI Type machine dependentC/C++ typedef Signature Call…MethodGet…Field boolean jboolean unsigned char Z Boolean byte jbyte signed char B Byte char jchar unsigned short C Char short jshort short S Short int jint int I Int long jlong long J Long float jfloat float…

    February 10, 2007
←Previous Page
1 … 289 290 291 292 293 … 310
Next Page→

Code, Strings, and Keys

Proudly powered by WordPress