How to call a function written in assembly language code from java?

1.2k views Asked by At

hi i would like to incorporate assembly language code with java.. guys give me some idea and example programs like hello world because assembly language is new to me..

1

There are 1 answers

0
AlexR On

The "right" solution is JNI or JNA.

But then it depends on your code. If for example you wish to call command line utility compiled to native code (and it does not matter which language was used for coding of this utility) call it by invocation of command line (use either Runtime.exec() or ProcessBuilder. If it is a library use JNI/JNA. If this is not just a library but for instance MS COM component (ActiveX) use one of available java interoperability projects like Jawin, Jintegra, Jinterop etc.