70 likes | 289 Views
Thesis Proposal. Template Recognition of Bytecodes and Execution using Hardware Architecture. (Vectorization of Java). by Ian Reddy. Java Virtual Machine Performance. Native Interface Method Development Tools for Automation of Wrapper Generation JNI++
E N D
Thesis Proposal Template Recognition of Bytecodes and Execution using Hardware Architecture. (Vectorization of Java) by Ian Reddy
Native Interface Method Development Tools for Automation of Wrapper Generation • JNI++ • (http://sourceforge.net/projects/jnipp) • Jace • (http://sourceforge.net/projects/jace/) • StartJ • (http://sourceforge.net/projects/startj) • Noodle Glue • ( www.noodleheaven.net/JavaOSG/javaosg.html) • Manual • ( www.isr.memebot.com/progress.html)
Steps for Native Method Development • Compile the Java Source File with javac • Generate the Native Interface Header using javah -jni option • Compile C source to get shared object library • Set Library path to point to generated shared object • Run the Program using java • Tedious Task Automation with Makefile
My Makefile all: make main $(JDK_HOME)/bin/javac Main.java main: Main.class libdhrylib.so libdhry.jar clean: rm -f *.class *.so *.o cleanall: rm -f *.class *.so *.o *~ Main.class: Main.java $(JDK_HOME)/bin/javac Main.java\ $(JDK_HOME)/javah -jni Main libdhrylib.so: dhryImp.c gcc dhryImp.c -o libdhrylib.so -shared -I $(JDK_HOME)/include/ -I $(JDK_HOME)/include/linux/ libdhry.jar: dhryImp.c Main.h $(JDK_HOME)/bin/jar -cvf libdhry.jar dhryImp.c Main.h
Putting it Together Development on IntelliJ • Create new project. • Add generated jar files to classpath. • Place the generated shared object in the java.library.path directory. • System.getProperty(“java.library.path”); • Run the Program.
Conclusion • Usage of native method improved the performance of Java Virtual Machine in the case of SUN JDK. • Other virtual machines failed on some dependancies with regard to intellij • Will tabulate the results when obtained. Thank you ian.fairfield@gmail.com www.isr.memebot.com