rename java run tests from main to runme for consistency across the languages
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@10932 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
a5d91ce4f1
commit
9cf5256b93
34 changed files with 55 additions and 55 deletions
|
|
@ -1,4 +1,4 @@
|
|||
public class main
|
||||
public class runme
|
||||
{
|
||||
static {
|
||||
try {
|
||||
|
|
@ -88,7 +88,7 @@ Note: when creating a C++ extension, you must run SWIG with the <tt>-c++</tt> op
|
|||
|
||||
<h2>A sample Java program</h2>
|
||||
|
||||
Click <a href="main.java">here</a> to see a Java program that calls the C++ functions from Java.
|
||||
Click <a href="runme.java">here</a> to see a Java program that calls the C++ functions from Java.
|
||||
|
||||
<h2>Key points</h2>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// This example illustrates how C++ classes can be used from Java using SWIG.
|
||||
// The Java class gets mapped onto the C++ class and behaves as if it is a Java class.
|
||||
|
||||
public class main {
|
||||
public class runme {
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("example");
|
||||
|
|
@ -20,7 +20,7 @@ to see a SWIG interface with some constant declarations in it.
|
|||
Click <a href="../../../Doc/Manual/Java.html#constants">here</a> for the section on constants in the SWIG and Java documentation.
|
||||
<p>
|
||||
|
||||
Click <a href="main.java">here</a> to see a Java program that prints out the values
|
||||
Click <a href="runme.java">here</a> to see a Java program that prints out the values
|
||||
of the constants contained in the above file.</p>
|
||||
<h2>Key points</h2>
|
||||
<ul>
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
import java.lang.reflect.*;
|
||||
|
||||
public class main {
|
||||
public class runme {
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("example");
|
||||
|
|
@ -21,7 +21,7 @@ See the documentation for the other approaches for wrapping enums.
|
|||
<ul>
|
||||
<li><a href="example.h">example.h</a>. Header file containing some enums.
|
||||
<li><a href="example.i">example.i</a>. Interface file.
|
||||
<li><a href="main.java">main.java</a>. Sample Java program.
|
||||
<li><a href="runme.java">runme.java</a>. Sample Java program.
|
||||
</ul>
|
||||
|
||||
<hr>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
public class main {
|
||||
public class runme {
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("example");
|
||||
|
|
@ -17,7 +17,7 @@ class CEO extends Manager {
|
|||
}
|
||||
|
||||
|
||||
public class main {
|
||||
public class runme {
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("example");
|
||||
|
|
@ -66,7 +66,7 @@ Here are some files that illustrate this with a simple example:
|
|||
<li><a href="example.c">example.c</a>
|
||||
<li><a href="example.h">example.h</a>
|
||||
<li><a href="example.i">example.i</a> (SWIG interface)
|
||||
<li><a href="main.java">main.java</a> (Sample program)
|
||||
<li><a href="runme.java">runme.java</a> (Sample program)
|
||||
</ul>
|
||||
|
||||
<h2>Notes</h2>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
public class main {
|
||||
public class runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
|
|
@ -30,7 +30,7 @@ certain C declarations are turned into constants.
|
|||
<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.
|
||||
On Unix most of the examples work by making the Makefile before executing the program runme.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>
|
||||
|
|
@ -39,7 +39,7 @@ A Unix example:
|
|||
<pre>
|
||||
$ make
|
||||
$ export LD_LIBRARY_PATH=. #ksh
|
||||
$ java main
|
||||
$ java runme
|
||||
</pre>
|
||||
</blockquote>
|
||||
<p>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
public class main {
|
||||
public class runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
|
|
@ -18,7 +18,7 @@ This example compares wrapping a c global function using the manual way and the
|
|||
|
||||
<ul>
|
||||
<li><a href="example.i">example.i</a>. Interface file comparing code wrapped by SWIG and wrapped manually.
|
||||
<li><a href="main.java">main.java</a>. Sample Java program showing calls to both manually wrapped and SWIG wrapped c functions.
|
||||
<li><a href="runme.java">runme.java</a>. Sample Java program showing calls to both manually wrapped and SWIG wrapped c functions.
|
||||
</ul>
|
||||
|
||||
<h2>Notes</h2>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
public class main {
|
||||
public class runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
|
|
@ -144,7 +144,7 @@ extraction.
|
|||
<ul>
|
||||
<li> <a href="example.c">example.c</a> (C Source)
|
||||
<li> <a href="example.i">example.i</a> (Swig interface)
|
||||
<li> <a href="main.java">main.java</a> (Java program)
|
||||
<li> <a href="runme.java">runme.java</a> (Java program)
|
||||
</ul>
|
||||
|
||||
<h2>Notes</h2>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
public class main {
|
||||
public class runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
|
|
@ -121,7 +121,7 @@ Click <a href="example.i">here</a> to see a SWIG interface file with these addit
|
|||
|
||||
<h2>Sample Java program</h2>
|
||||
|
||||
Click <a href="main.java">here</a> to see a Java program that manipulates some C++ references.
|
||||
Click <a href="runme.java">here</a> to see a Java program that manipulates some C++ references.
|
||||
|
||||
<h2>Notes:</h2>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// This example illustrates the manipulation of C++ references in Java.
|
||||
|
||||
public class main {
|
||||
public class runme {
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("example");
|
||||
|
|
@ -65,15 +65,15 @@ to create the extension <tt>libexample.so (unix)</tt>.
|
|||
|
||||
<h2>Using the extension</h2>
|
||||
|
||||
Click <a href="main.java">here</a> to see a program that calls our C functions from Java.
|
||||
Click <a href="runme.java">here</a> to see a program that calls our C functions from Java.
|
||||
<p>
|
||||
Compile the java files <tt><a href="example.java">example.java</a></tt> and <tt><a href="main.java">main.java</a></tt>
|
||||
to create the class files example.class and main.class before running main in the JVM. Ensure that the libexample.so file is in your LD_LIBRARY_PATH before running. For example:
|
||||
Compile the java files <tt><a href="example.java">example.java</a></tt> and <tt><a href="runme.java">runme.java</a></tt>
|
||||
to create the class files example.class and runme.class before running runme in the JVM. Ensure that the libexample.so file is in your LD_LIBRARY_PATH before running. For example:
|
||||
<blockquote>
|
||||
<pre>
|
||||
export LD_LIBRARY_PATH=. #ksh
|
||||
javac *.java
|
||||
java main
|
||||
java runme
|
||||
</pre>
|
||||
</blockquote>
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
public class main {
|
||||
public class runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
|
|
@ -85,7 +85,7 @@ Note that SWIG parses the templated function <tt>max</tt> and templated class <t
|
|||
|
||||
<h2>A sample Java program</h2>
|
||||
|
||||
Click <a href="main.java">here</a> to see a Java program that calls the C++ functions from Java.
|
||||
Click <a href="runme.java">here</a> to see a Java program that calls the C++ functions from Java.
|
||||
|
||||
<h2>Notes</h2>
|
||||
Use templated classes just like you would any other SWIG generated Java class. Use the classnames specified by the %template directive.
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
// This example illustrates how C++ templates can be used from Java.
|
||||
|
||||
public class main {
|
||||
public class runme {
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("example");
|
||||
|
|
@ -16,7 +16,7 @@ This example shows how typemaps can be used to modify the default behaviour of t
|
|||
|
||||
<ul>
|
||||
<li><a href="example.i">example.i</a>. Interface file.
|
||||
<li><a href="main.java">main.java</a>. Sample Java program.
|
||||
<li><a href="runme.java">runme.java</a>. Sample Java program.
|
||||
</ul>
|
||||
|
||||
<h2>Notes</h2>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
public class main {
|
||||
public class runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
|
|
@ -38,7 +38,7 @@ example.set_foo(12.3);
|
|||
</pre>
|
||||
</blockquote>
|
||||
|
||||
Click <a href="main.java">here</a> to see the example program that updates and prints
|
||||
Click <a href="runme.java">here</a> to see the example program that updates and prints
|
||||
out the values of the variables using this technique.
|
||||
|
||||
<h2>Key points</h2>
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import java.lang.reflect.*;
|
||||
|
||||
public class main {
|
||||
public class runme {
|
||||
static {
|
||||
try {
|
||||
System.loadLibrary("example");
|
||||
Loading…
Add table
Add a link
Reference in a new issue