The great merge

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk/SWIG@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Dave Beazley 2002-11-30 22:01:28 +00:00
commit 12a43edc2d
1508 changed files with 125983 additions and 44037 deletions

View file

@ -0,0 +1,11 @@
*.class
*.java
*_wrap.c
*_wrap.cxx
example.dll
example.dsw
example.ncb
example.opt
example.plg
Release
Debug

View file

@ -1,17 +1,18 @@
TOP = ../..
SWIG = $(TOP)/../swig
SRCS =
TARGET = libexample
TARGET = example
INTERFACE = example.i
SWIGOPT =
SWIGOPT = -noproxy
all:: java
java::
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java
javac *.java
clean::
rm -f *_wrap* *.o core *~ *.so *.class example.java
$(MAKE) -f $(TOP)/Makefile java_clean
check: all

View file

@ -1,8 +0,0 @@
Example of a typemap to handle return values in char * arguments.
type:
make
javac *.java
export LD_LIBRARY_PATH=. # sh
setenv LD_LIBRARY_PATH . # csh
java main

View file

@ -0,0 +1,34 @@
<html>
<head>
<title>SWIG:Examples:java:typemap</title>
</head>
<body bgcolor="#ffffff">
<tt>SWIG/Examples/java/typemap/</tt>
<hr>
<H2>Typemaps in Java</H2>
<tt>$Header$</tt><br>
<p>
This example shows how typemaps can be used to modify the default behaviour of the Java SWIG module.
<ul>
<li><a href="example.i">example.i</a>. Interface file.
<li><a href="main.java">main.java</a>. Sample Java program.
</ul>
<h2>Notes</h2>
<ul>
<li>Shows how to pass strings to Java from c and visa versa.
<li>Typemaps can modify the default behaviour of the Java SWIG module.
<li>The default c to java mapping can be modified using typemaps.
</ul>
<hr>
</body>
</html>

View file

@ -1,4 +1,3 @@
import example;
public class main {
@ -6,7 +5,7 @@ public class main {
try {
System.loadLibrary("example");
} catch (UnsatisfiedLinkError e) {
System.err.println("Cannot load the example native code.\nMake sure your LD_LIBRARY_PATH contains \'.\'\n" + e);
System.err.println("Native code library failed to load. See the chapter on Dynamic Linking Problems in the SWIG Java documentation for help.\n" + e);
System.exit(1);
}
}