The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6fcc22a1f8
commit
516036631c
1508 changed files with 125983 additions and 44037 deletions
68
SWIG/Examples/java/index.html
Normal file
68
SWIG/Examples/java/index.html
Normal file
|
|
@ -0,0 +1,68 @@
|
|||
<html>
|
||||
<head>
|
||||
<title>SWIG:Examples:java</title>
|
||||
</head>
|
||||
|
||||
<body bgcolor="#ffffff">
|
||||
<H1>SWIG Java Examples</H1>
|
||||
|
||||
<tt>$Header$</tt><br>
|
||||
|
||||
<p>
|
||||
The following examples illustrate the use of SWIG with Java.
|
||||
|
||||
<ul>
|
||||
<li><a href="simple/index.html">simple</a>. A minimal example showing how SWIG can
|
||||
be used to wrap a C function, a global variable, and a constant.
|
||||
<li><a href="native/index.html">native</a>. Comparing the manual and the SWIG approach to calling native code.
|
||||
<li><a href="typemap/index.html">typemap</a>. Modifying the Java module's default behaviour by using typemaps.
|
||||
<li><a href="constants/index.html">constants</a>. This shows how preprocessor macros and
|
||||
certain C declarations are turned into constants.
|
||||
<li><a href="variables/index.html">variables</a>. An example showing how to access C global variables.
|
||||
<li><a href="enum/index.html">enum</a>. Wrapping enumerations.
|
||||
<li><a href="class/index.html">class</a>. How to wrap a simple C++ class.
|
||||
<li><a href="reference/index.html">reference</a>. C++ references.
|
||||
<li><a href="pointer/index.html">pointer</a>. Simple pointer handling.
|
||||
<li><a href="template/index.html">template</a>. C++ templates.
|
||||
<li><a href="funcptr/index.html">funcptr</a>. Pointers to functions.
|
||||
</ul>
|
||||
|
||||
<h2>Running the examples</h2>
|
||||
Please see the <a href="../../Doc/Manual/Windows.html">Windows</a> page in the main manual for information on using the examples on Windows. <p>
|
||||
|
||||
On Unix most of the examples work by making the Makefile before executing the program main.java. The Makefile will output the swig generated JNI c code as well as the Java wrapper classes. Additionally the JNI c/c++ code is compiled into the shared object (dynamic link library) which is needed for dynamic linking to the native code. The Makefiles also compile the Java files using javac.
|
||||
<p>
|
||||
Ensure that the dynamic link library file is in the appropriate path before executing the Java program. For example in Unix, libexample.so must be in the LD_LIBRARY_PATH.
|
||||
<p>
|
||||
A Unix example:
|
||||
<blockquote>
|
||||
<pre>
|
||||
$ make
|
||||
$ export LD_LIBRARY_PATH=. #ksh
|
||||
$ java main
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
||||
</ul>
|
||||
|
||||
<h2>Compatibility</h2>
|
||||
|
||||
The examples have been extensively tested on the following platforms:
|
||||
|
||||
<ul>
|
||||
<li>Solaris
|
||||
</ul>
|
||||
|
||||
The examples have been extensively tested using Sun's JDK on:
|
||||
|
||||
<ul>
|
||||
<li>Sparc Solaris 2.6.
|
||||
</ul>
|
||||
|
||||
Your mileage may vary. If you experience a problem, please let us know by
|
||||
sending a message to <a href="mailto:swig-dev@cs.uchicago.edu">swig-dev@cs.uchicago.edu</a>.
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue