Bartko Zoltan wrote:
------------------------------------------------------------------------
package j2;
import com.sun.jna.Pointer;
import com.sun.jna.WString;
import com.sun.jna.ptr.PointerByReference;
/**
*
* @author bartkoz
*/
public class Main {
/** Creates a new instance of Main */
public Main() {
}
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
String old = System.setProperty("jna.library.path", "/usr/lib");
HunSpell hunspell = HunSpell.INSTANCE;
Pointer pHunspell =
hunspell.Hunspell_create("/opt/openoffice.org2.2/share/dict/ooo/hu_HU.aff",
"/opt/openoffice.org2.2/share/dict/ooo/hu_HU.dic");
String e = hunspell.Hunspell_get_dic_encoding(pHunspell);
int i = hunspell.Hunspell_spell(pHunspell, new WString("legyező"));
int j = hunspell.Hunspell_spell(pHunspell, new WString("legzező"));
PointerByReference strings = null;
The above line is most likely your problem. It should be:
PointerByReference strings = new PointerByReference();
int k = hunspell.Hunspell_suggest(pHunspell, strings, "ábrak");
hunspell.Hunspell_destroy(pHunspell);
}
}
------------------------------------------------------------------------