Question

I have a super simple program. And whenever I try running it in Eclipse I get this error:

Exception in thread "main" java.lang.UnsatisfiedLinkError: no luajava-1.1 in java.library.path
    at java.lang.ClassLoader.loadLibrary(Unknown Source)
    at java.lang.Runtime.loadLibrary0(Unknown Source)
    at java.lang.System.loadLibrary(Unknown Source)
    at org.keplerproject.luajava.LuaState.<clinit>(LuaState.java:92)
    at org.keplerproject.luajava.LuaStateFactory.newLuaState(LuaStateFactory.java:59)
    at com.gmail.developnickmaster21.LuaJavaTesting.ClassThatUsesLuaJava.main(ClassThatUsesLuaJava.java:9)

I'm not quite sure where to begin with that... I have double check that the LuaJava jar is where I say it is and it still won't work. Any help?

No correct solution

OTHER TIPS

It means that you did not setup Lua libs properly. First of all add to your Main-class that code:

static {
    System.out.println(System.getProperty("java.library.path"));
}

I'm absolutely sure there's no path to your luajava-1.1.dll\so

So here's 3 solutions:

1)Go to VM config (Run -> Run Configuration -> Arguments ->) and add to "VM arguments" the following -Djava.library.path="PATH_TO_YOUR_OWN/luajava-1.1;${env_var:PATH}"

2)Window -> Preferences -> Java -> Build Path -> User Libraries -> add library with your luajava-1.1.jar -> edit "Native library location" to path to your luajava-1.1.dll

3)Add folder with luajava-1.1.dll to your system variable PATH (or just move that lib to any folder already in PATH)

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top