JNLua 1.0.4 and 0.9.6

86 views
Skip to first unread message

Andre Naef

unread,
Jul 28, 2013, 5:58:17 PM7/28/13
to jnlua-...@googlegroups.com
I am happy to announce the release of JNLua 1.0.4 and 0.9.6 for Lua 5.2 and
5.1 respectively.

From the release notes:

---
* Release 1.0.4 (2013-07-28)

- Corrected an issue where method dispatch would enter an endless loop on
non-public superclasses.
---

(An identical release note is provided for JNLua 0.9.6.)


Cheers, André


Derek

unread,
Oct 8, 2013, 4:09:41 PM10/8/13
to jnlua-...@googlegroups.com
Will you be adding support for luajit? I think jnlua would be really useful in web development with lapis and openresty which uses luajit,

I've tried to do this myself on ubuntu. 

openresty stores its own version of luajit under its /usr/local/openresty/ directory

I've added #define LUA_USE_POSIX to its luaconf.h

make then worked
mvn clean worked
mvn javadoc:jar worked
mvn package did not work

Tests in error: 
  testClosed(com.naef.jnlua.test.LuaStateErrorTest): no jnlua5.1 in java.library.path
  testIllegalSetTable(com.naef.jnlua.test.LuaStateErrorTest): Could not initialize class com.naef.jnlua.LuaState
  testNilSetTable(com.naef.jnlua.test.LuaStateErrorTest): Could not initialize class com.naef.jnlua.LuaState
  ...

my paths:
JDK_DIR=/opt/java/64/jdk1.7.0_40
LUA_LIB_DIR=/usr/local/openresty/luajit/share/luajit-2.0.2
LUA_INC_DIR=/usr/local/openresty/luajit/include/luajit-2.0

do you have any idea what might be wrong?

Derek

unread,
Oct 8, 2013, 6:10:13 PM10/8/13
to jnlua-...@googlegroups.com
just got mvn package working,

Derek

unread,
Oct 8, 2013, 6:40:30 PM10/8/13
to jnlua-...@googlegroups.com
finished mvn package

but I get this error

>  System = java.require("java.lang.System")
stdin:1: attempt to index global 'java' (a nil value)
stack traceback:
stdin:1: in main chunk
[C]: ?

still kind of confused about how to include java into lua. Can you please tell me what I'm doing wrong? 


On Sunday, 28 July 2013 14:58:17 UTC-7, Andre Naef wrote:

Andre Naef

unread,
Oct 8, 2013, 7:10:00 PM10/8/13
to jnlua-...@googlegroups.com

Just must load the Java VM module and create a Java VM first. An example is provided here:

https://code.google.com/p/jnlua/wiki/JavaVMModule

--
You received this message because you are subscribed to the Google Groups "JNLua Discussion" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jnlua-discus...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Derek

unread,
Oct 11, 2013, 2:13:27 PM10/11/13
to jnlua-...@googlegroups.com
I'm getting this as an error


require("javavm")
error loading module 'javavm' from file '/usr/local/openresty/luajit/lib/lua/5.1/javavm.so':
libjvm.so: cannot open shared object file: No such file or directory


during native creation I set

JDK_DIR=/opt/java/64/jdk1.7.0_40

and I found libjvm.so at /opt/java/64/jdk1.7.0_40/jre/lib/amd64/server/


not sure why javavm can't find libjvm.so

To unsubscribe from this group and stop receiving emails from it, send an email to jnlua-discuss+unsubscribe@googlegroups.com.

André Naef

unread,
Oct 27, 2013, 3:54:16 PM10/27/13
to jnlua-...@googlegroups.com

libjvm.so and its dependencies must be on the library loading path. This can be done by including those directories in LD_LIBRARY_PATH or PATH, depending on the platform.

To unsubscribe from this group and stop receiving emails from it, send an email to jnlua-discus...@googlegroups.com.

--

You received this message because you are subscribed to the Google Groups "JNLua Discussion" group.

To unsubscribe from this group and stop receiving emails from it, send an email to jnlua-discus...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages