diff --git a/Doc/Manual/Java.html b/Doc/Manual/Java.html index 518426f5a..99e7f6c59 100644 --- a/Doc/Manual/Java.html +++ b/Doc/Manual/Java.html @@ -353,9 +353,9 @@ The name of the module is specified using the %module directive or To load your shared native library module in Java, simply use Java's System.loadLibrary method in a Java class:
-// main.java
+// runme.java
-public class main {
+public class runme {
static {
System.loadLibrary("example");
}
@@ -372,7 +372,7 @@ Compile all the Java files and run:
$ javac *.java
-$ java main
+$ java runme
24
$
@@ -394,12 +394,12 @@ You may get an exception similar to this:
-$ java main
+$ java runme
Exception in thread "main" java.lang.UnsatisfiedLinkError: no example in java.library.path
at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1312)
at java.lang.Runtime.loadLibrary0(Runtime.java:749)
at java.lang.System.loadLibrary(System.java:820)
- at main.<clinit>(main.java:5)
+ at runme.<clinit>(runme.java:5)
@@ -426,7 +426,7 @@ The following exception is indicative of this:
-$ java main
+$ java runme
Exception in thread "main" java.lang.UnsatisfiedLinkError: libexample.so: undefined
symbol: fact
at java.lang.ClassLoader$NativeLibrary.load(Native Method)
@@ -434,7 +434,7 @@ symbol: fact
at java.lang.ClassLoader.loadLibrary(ClassLoader.java, Compiled Code)
at java.lang.Runtime.loadLibrary0(Runtime.java, Compiled Code)
at java.lang.System.loadLibrary(System.java, Compiled Code)
- at main.<clinit>(main.java:5)
+ at runme.<clinit>(runme.java:5)
$
@@ -3760,7 +3760,7 @@ will produce a familiar looking Java exception:
Exception in thread "main" java.lang.OutOfMemoryError: Not enough memory
at exampleJNI.malloc(Native Method)
at example.malloc(example.java:16)
- at main.main(main.java:112)
+ at runme.main(runme.java:112)
-// File main.java
+// File runme.java
-public class main {
+public class runme {
static {
try {
@@ -6196,7 +6196,7 @@ When compiled and run we get:
-$ java main
+$ java runme
argv[0] = Cat
argv[1] = Dog
argv[2] = Cow
@@ -6387,9 +6387,9 @@ The following Java program demonstrates this:
-// File: main.java
+// File: runme.java
-public class main {
+public class runme {
static {
try {
@@ -6414,7 +6414,7 @@ When compiled and run we get:
-$ java main
+$ java runme
1 12.0 340.0
@@ -6474,7 +6474,7 @@ We get:
Ambulance started
java.lang.ClassCastException
- at main.main(main.java:16)
+ at runme.main(runme.java:16)
diff --git a/Examples/GIFPlot/Java/full/README b/Examples/GIFPlot/Java/full/README
index f536864de..93463ea30 100644
--- a/Examples/GIFPlot/Java/full/README
+++ b/Examples/GIFPlot/Java/full/README
@@ -1,8 +1,8 @@
This example runs the entire gifplot.h header file through SWIG without
-any changes. The program 'main.java' does something a little more
-interesting. After doing a make, run it using 'java main'. You'll have to go
+any changes. The program 'runme.java' does something a little more
+interesting. After doing a make, run it using 'java runme'. You'll have to go
look at the header file to get a complete listing of the functions.
-Note the differences in the main.java files between this example and the
+Note the differences in the runme.java files between this example and the
'full' example. This example does not use shadow classes.
diff --git a/Examples/GIFPlot/Java/full/main.java b/Examples/GIFPlot/Java/full/runme.java
similarity index 99%
rename from Examples/GIFPlot/Java/full/main.java
rename to Examples/GIFPlot/Java/full/runme.java
index 8fb65c86d..c47c1e672 100644
--- a/Examples/GIFPlot/Java/full/main.java
+++ b/Examples/GIFPlot/Java/full/runme.java
@@ -1,7 +1,7 @@
// Plot a 3D function
import java.lang.Math;
-public class main {
+public class runme {
static {
try {
diff --git a/Examples/GIFPlot/Java/shadow/README b/Examples/GIFPlot/Java/shadow/README
index 4adbde306..b06c5a8f1 100644
--- a/Examples/GIFPlot/Java/shadow/README
+++ b/Examples/GIFPlot/Java/shadow/README
@@ -1,5 +1,5 @@
This example uses the file in ../../Interface/gifplot.i to build
-an interface with shadow classes. After doing a make, run the program main, ie: 'java main'.
+an interface with shadow classes. After doing a make, run the program runme, ie: 'java runme'.
-Note the differences in the main.java files between this example and the
+Note the differences in the runme.java files between this example and the
'full' example. This example uses the shadow classes.
diff --git a/Examples/GIFPlot/Java/shadow/main.java b/Examples/GIFPlot/Java/shadow/runme.java
similarity index 99%
rename from Examples/GIFPlot/Java/shadow/main.java
rename to Examples/GIFPlot/Java/shadow/runme.java
index fbcf6e792..91db03898 100644
--- a/Examples/GIFPlot/Java/shadow/main.java
+++ b/Examples/GIFPlot/Java/shadow/runme.java
@@ -2,7 +2,7 @@
import java.lang.Math;
-public class main {
+public class runme {
static {
try {
diff --git a/Examples/GIFPlot/Java/simple/README b/Examples/GIFPlot/Java/simple/README
index 1fb8453f0..13ff49611 100644
--- a/Examples/GIFPlot/Java/simple/README
+++ b/Examples/GIFPlot/Java/simple/README
@@ -1,5 +1,5 @@
This is a very minimalistic example in which just a few functions
and constants from library are wrapped and used to draw some simple
-shapes. After doing a make, run the java program, ie 'java main'.
+shapes. After doing a make, run the java program, ie 'java runme'.
diff --git a/Examples/GIFPlot/Java/simple/main.java b/Examples/GIFPlot/Java/simple/runme.java
similarity index 98%
rename from Examples/GIFPlot/Java/simple/main.java
rename to Examples/GIFPlot/Java/simple/runme.java
index b165a4baa..2d8d2bb48 100644
--- a/Examples/GIFPlot/Java/simple/main.java
+++ b/Examples/GIFPlot/Java/simple/runme.java
@@ -1,5 +1,5 @@
-public class main {
+public class runme {
static {
try {
diff --git a/Examples/Makefile.in b/Examples/Makefile.in
index 7f27ce976..c0ced7022 100644
--- a/Examples/Makefile.in
+++ b/Examples/Makefile.in
@@ -489,7 +489,7 @@ java_cpp: $(SRCS)
# -----------------------------------------------------------------
java_clean:
- rm -f *_wrap* *~ .~* *.class `find . -name \*.java | grep -v main.java`
+ rm -f *_wrap* *~ .~* *.class `find . -name \*.java | grep -v runme.java`
rm -f core @EXTRA_CLEAN@
rm -f *.@OBJEXT@ *@JAVASO@
diff --git a/Examples/java/callback/main.java b/Examples/java/callback/runme.java
similarity index 98%
rename from Examples/java/callback/main.java
rename to Examples/java/callback/runme.java
index 4800f8cc9..4090f0ac3 100644
--- a/Examples/java/callback/main.java
+++ b/Examples/java/callback/runme.java
@@ -1,4 +1,4 @@
-public class main
+public class runme
{
static {
try {
diff --git a/Examples/java/class/index.html b/Examples/java/class/index.html
index e9db7e94a..cf9130c62 100644
--- a/Examples/java/class/index.html
+++ b/Examples/java/class/index.html
@@ -88,7 +88,7 @@ Note: when creating a C++ extension, you must run SWIG with the -c++ op
A sample Java program
-Click here to see a Java program that calls the C++ functions from Java.
+Click here to see a Java program that calls the C++ functions from Java.
Key points
diff --git a/Examples/java/class/main.java b/Examples/java/class/runme.java
similarity index 99%
rename from Examples/java/class/main.java
rename to Examples/java/class/runme.java
index 8ef35db6d..e1ea0d71c 100644
--- a/Examples/java/class/main.java
+++ b/Examples/java/class/runme.java
@@ -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");
diff --git a/Examples/java/constants/index.html b/Examples/java/constants/index.html
index 8367d0571..9f1e95a03 100644
--- a/Examples/java/constants/index.html
+++ b/Examples/java/constants/index.html
@@ -20,7 +20,7 @@ to see a SWIG interface with some constant declarations in it.
Click here for the section on constants in the SWIG and Java documentation.
-Click here to see a Java program that prints out the values
+Click here to see a Java program that prints out the values
of the constants contained in the above file.
Key points
diff --git a/Examples/java/constants/main.java b/Examples/java/constants/runme.java
similarity index 98%
rename from Examples/java/constants/main.java
rename to Examples/java/constants/runme.java
index 7130c3d70..2c67d86aa 100644
--- a/Examples/java/constants/main.java
+++ b/Examples/java/constants/runme.java
@@ -1,6 +1,6 @@
import java.lang.reflect.*;
-public class main {
+public class runme {
static {
try {
System.loadLibrary("example");
diff --git a/Examples/java/enum/index.html b/Examples/java/enum/index.html
index 52c06c5d1..20daf2691 100644
--- a/Examples/java/enum/index.html
+++ b/Examples/java/enum/index.html
@@ -21,7 +21,7 @@ See the documentation for the other approaches for wrapping enums.
- example.h. Header file containing some enums.
- example.i. Interface file.
-
- main.java. Sample Java program.
+
- runme.java. Sample Java program.
diff --git a/Examples/java/enum/main.java b/Examples/java/enum/runme.java
similarity index 98%
rename from Examples/java/enum/main.java
rename to Examples/java/enum/runme.java
index 8646e0087..56e49af91 100644
--- a/Examples/java/enum/main.java
+++ b/Examples/java/enum/runme.java
@@ -1,5 +1,5 @@
-public class main {
+public class runme {
static {
try {
System.loadLibrary("example");
diff --git a/Examples/java/extend/main.java b/Examples/java/extend/runme.java
similarity index 99%
rename from Examples/java/extend/main.java
rename to Examples/java/extend/runme.java
index ee3a94ed0..629bb14a6 100644
--- a/Examples/java/extend/main.java
+++ b/Examples/java/extend/runme.java
@@ -17,7 +17,7 @@ class CEO extends Manager {
}
-public class main {
+public class runme {
static {
try {
System.loadLibrary("example");
diff --git a/Examples/java/funcptr/index.html b/Examples/java/funcptr/index.html
index 0ad2be1cf..56d3baa18 100644
--- a/Examples/java/funcptr/index.html
+++ b/Examples/java/funcptr/index.html
@@ -66,7 +66,7 @@ Here are some files that illustrate this with a simple example:
- example.c
- example.h
- example.i (SWIG interface)
-
- main.java (Sample program)
+
- runme.java (Sample program)
Notes
diff --git a/Examples/java/funcptr/main.java b/Examples/java/funcptr/runme.java
similarity index 98%
rename from Examples/java/funcptr/main.java
rename to Examples/java/funcptr/runme.java
index cf81f92b4..cd34c1b65 100644
--- a/Examples/java/funcptr/main.java
+++ b/Examples/java/funcptr/runme.java
@@ -1,5 +1,5 @@
-public class main {
+public class runme {
static {
try {
diff --git a/Examples/java/index.html b/Examples/java/index.html
index d98f9a393..007e14dbc 100644
--- a/Examples/java/index.html
+++ b/Examples/java/index.html
@@ -30,7 +30,7 @@ certain C declarations are turned into constants.
Running the examples
Please see the Windows page in the main manual for information on using the examples on Windows.
-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.
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.
@@ -39,7 +39,7 @@ A Unix example:
$ make
$ export LD_LIBRARY_PATH=. #ksh
-$ java main
+$ java runme
diff --git a/Examples/java/multimap/main.java b/Examples/java/multimap/runme.java
similarity index 97%
rename from Examples/java/multimap/main.java
rename to Examples/java/multimap/runme.java
index 331ac6b89..738330e77 100644
--- a/Examples/java/multimap/main.java
+++ b/Examples/java/multimap/runme.java
@@ -1,5 +1,5 @@
-public class main {
+public class runme {
static {
try {
diff --git a/Examples/java/native/index.html b/Examples/java/native/index.html
index 7ecf129ce..1ca51c1e9 100644
--- a/Examples/java/native/index.html
+++ b/Examples/java/native/index.html
@@ -18,7 +18,7 @@ This example compares wrapping a c global function using the manual way and the
- example.i. Interface file comparing code wrapped by SWIG and wrapped manually.
-
- main.java. Sample Java program showing calls to both manually wrapped and SWIG wrapped c functions.
+
- runme.java. Sample Java program showing calls to both manually wrapped and SWIG wrapped c functions.
Notes
diff --git a/Examples/java/native/main.java b/Examples/java/native/runme.java
similarity index 96%
rename from Examples/java/native/main.java
rename to Examples/java/native/runme.java
index f4760bb3d..e9a18b21a 100644
--- a/Examples/java/native/main.java
+++ b/Examples/java/native/runme.java
@@ -1,5 +1,5 @@
-public class main {
+public class runme {
static {
try {
diff --git a/Examples/java/pointer/index.html b/Examples/java/pointer/index.html
index c30d549e6..e20fe3328 100644
--- a/Examples/java/pointer/index.html
+++ b/Examples/java/pointer/index.html
@@ -144,7 +144,7 @@ extraction.
- example.c (C Source)
- example.i (Swig interface)
-
- main.java (Java program)
+
- runme.java (Java program)
Notes
diff --git a/Examples/java/pointer/main.java b/Examples/java/pointer/runme.java
similarity index 98%
rename from Examples/java/pointer/main.java
rename to Examples/java/pointer/runme.java
index e96e02eaa..f32f980f9 100644
--- a/Examples/java/pointer/main.java
+++ b/Examples/java/pointer/runme.java
@@ -1,5 +1,5 @@
-public class main {
+public class runme {
static {
try {
diff --git a/Examples/java/reference/index.html b/Examples/java/reference/index.html
index 64b129cbb..33c80c50f 100644
--- a/Examples/java/reference/index.html
+++ b/Examples/java/reference/index.html
@@ -121,7 +121,7 @@ Click here to see a SWIG interface file with these addit
Sample Java program
-Click here to see a Java program that manipulates some C++ references.
+Click here to see a Java program that manipulates some C++ references.
Notes:
diff --git a/Examples/java/reference/main.java b/Examples/java/reference/runme.java
similarity index 99%
rename from Examples/java/reference/main.java
rename to Examples/java/reference/runme.java
index 4fd354761..6a2d9bf70 100644
--- a/Examples/java/reference/main.java
+++ b/Examples/java/reference/runme.java
@@ -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");
diff --git a/Examples/java/simple/index.html b/Examples/java/simple/index.html
index a363327fe..9729e6dd8 100644
--- a/Examples/java/simple/index.html
+++ b/Examples/java/simple/index.html
@@ -65,15 +65,15 @@ to create the extension libexample.so (unix).
Using the extension
-Click here to see a program that calls our C functions from Java.
+Click here to see a program that calls our C functions from Java.
-Compile the java files example.java and main.java
-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 example.java and runme.java
+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:
export LD_LIBRARY_PATH=. #ksh
javac *.java
-java main
+java runme
diff --git a/Examples/java/simple/main.java b/Examples/java/simple/runme.java
similarity index 97%
rename from Examples/java/simple/main.java
rename to Examples/java/simple/runme.java
index 6d224a4dc..92880e8f9 100644
--- a/Examples/java/simple/main.java
+++ b/Examples/java/simple/runme.java
@@ -1,5 +1,5 @@
-public class main {
+public class runme {
static {
try {
diff --git a/Examples/java/template/index.html b/Examples/java/template/index.html
index 1aebd4c2a..f4408e568 100644
--- a/Examples/java/template/index.html
+++ b/Examples/java/template/index.html
@@ -85,7 +85,7 @@ Note that SWIG parses the templated function max and templated class A sample Java program
-Click here to see a Java program that calls the C++ functions from Java.
+Click here to see a Java program that calls the C++ functions from Java.
Notes
Use templated classes just like you would any other SWIG generated Java class. Use the classnames specified by the %template directive.
diff --git a/Examples/java/template/main.java b/Examples/java/template/runme.java
similarity index 98%
rename from Examples/java/template/main.java
rename to Examples/java/template/runme.java
index 9129fcf2a..5d1097bba 100644
--- a/Examples/java/template/main.java
+++ b/Examples/java/template/runme.java
@@ -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");
diff --git a/Examples/java/typemap/index.html b/Examples/java/typemap/index.html
index 486aa8e79..5dd591941 100644
--- a/Examples/java/typemap/index.html
+++ b/Examples/java/typemap/index.html
@@ -16,7 +16,7 @@ This example shows how typemaps can be used to modify the default behaviour of t
- example.i. Interface file.
-
- main.java. Sample Java program.
+
- runme.java. Sample Java program.
Notes
diff --git a/Examples/java/typemap/main.java b/Examples/java/typemap/runme.java
similarity index 96%
rename from Examples/java/typemap/main.java
rename to Examples/java/typemap/runme.java
index bd9a4e1b6..fcbcc3067 100644
--- a/Examples/java/typemap/main.java
+++ b/Examples/java/typemap/runme.java
@@ -1,5 +1,5 @@
-public class main {
+public class runme {
static {
try {
diff --git a/Examples/java/variables/index.html b/Examples/java/variables/index.html
index 05aaa2d6e..07b19d4e7 100644
--- a/Examples/java/variables/index.html
+++ b/Examples/java/variables/index.html
@@ -38,7 +38,7 @@ example.set_foo(12.3);
-Click here to see the example program that updates and prints
+Click here to see the example program that updates and prints
out the values of the variables using this technique.
Key points
diff --git a/Examples/java/variables/main.java b/Examples/java/variables/runme.java
similarity index 99%
rename from Examples/java/variables/main.java
rename to Examples/java/variables/runme.java
index 92745db99..361a30fa6 100644
--- a/Examples/java/variables/main.java
+++ b/Examples/java/variables/runme.java
@@ -2,7 +2,7 @@
import java.lang.reflect.*;
-public class main {
+public class runme {
static {
try {
System.loadLibrary("example");