how to call external dll function from java code -



how to call external dll function from java code -

please help me. need phone call external dll library function java code. utilize netbeans 7.2. dll's functions are:

boolean isvalid(string word) list<string> getwords(string word)

i'm follow this example. don't know how declare dll functions. , found link. doesn't work me. (sorry bad english)

i stumbled upon same problem of "calling dll java" , first frustrated complexity. yet, there elegant solution (might interesting people on there in processing.org habitat..) given rather "general" form of question (maybe, downrating not justified that), suppose, rather easy-going solution indicated. in other words, solution avoids messing aronud header files, conversions, etc., source code not available.

my recommendation jna (https://github.com/twall/jna), simplifying wrapper around jni. works great, type mapping straightforward (e.g. pchar = lpcstr buffer -> string), though using towards windows dlls , own c-style dlls created using delphi-pascal. thing consider homecoming values should exported through functions rather "out" flagged reference variables. question points linked source provides illustration (so, answers around jni may misplaced here). note link provided contains axamples transfer of arrays , pointers.

java dll call jna

Comments

Popular posts from this blog

web services - java.lang.NoClassDefFoundError: Could not initialize class net.sf.cglib.proxy.Enhancer -

Accessing MATLAB's unicode strings from C -

javascript - mongodb won't find my schema method in nested container -