Printable Version of this PageHome PageRecent ChangesSearchSign In

Java stuff

To compile:
javac -classpath lib/log4j.jar -d classes src/com/foo/.java

To generate native method C header file (needed to copy signature for C library or include for calls from C to Java):
javah -classpath classes -d include

To compile C shared library:
gcc -o lib/ -shared -I/usr/local/java/include -I/usr/local/java/include/linux src/com/foo/NativeTest.c -static -lc

To run:
java -cp classes:lib/log4j.jar -Djava.library.path=lib