PageRenderTime 25ms CodeModel.GetById 0ms RepoModel.GetById 0ms app.codeStats 0ms

/trunk/Examples/java/native/index.html

#
HTML | 33 lines | 24 code | 9 blank | 0 comment | 0 complexity | 09b4edc840b30c1d138360cbbd780d76 MD5 | raw file
Possible License(s): LGPL-2.1, Cube, GPL-3.0, 0BSD, GPL-2.0
  1. <html>
  2. <head>
  3. <title>SWIG:Examples:java:native</title>
  4. </head>
  5. <body bgcolor="#ffffff">
  6. <tt>SWIG/Examples/java/native/</tt>
  7. <hr>
  8. <H2>SWIG wrapped and manually wrapped functions in Java</H2>
  9. Click <a href="../../../Doc/Manual/Java.html#using_own_jni_functions">here</a> for the relevant section in the SWIG and Java documentation.
  10. <p>
  11. This example compares wrapping a c global function using the manual way and the SWIG way.
  12. </p>
  13. <ul>
  14. <li><a href="example.i">example.i</a>. Interface file comparing code wrapped by SWIG and wrapped manually.
  15. <li><a href="runme.java">runme.java</a>. Sample Java program showing calls to both manually wrapped and SWIG wrapped c functions.
  16. </ul>
  17. <h2>Notes</h2>
  18. <ul>
  19. <li>SWIG writes all the awkward JNI code for you. You just have to tell SWIG which functions to wrap.
  20. <li>If memory is allocated in c it needs to be free'd. A function, such as free(), can be provided with access from Java to free the memory.
  21. </ul>
  22. <hr>
  23. </body>
  24. </html>