jasonsantos / luajava

LuaJava is a scripting tool for Java. The goal of this tool is to allow scripts written in Lua to manipulate components developed in Java. LuaJava allows Java components to be accessed from Lua using the same syntax that is used for accessing Lua`s native objects, without any need for declarations or any kind of preprocessing. LuaJava also allows Java to implement an interface using Lua. This way any interface can be implemented in Lua and passed as parameter to any method, and when called, the equivalent function will be called in Lua, and it's result passed back to Java.
http://www.keplerproject.org/luajava/
MIT License
377 stars 126 forks source link

Build on OSX #4

Open rumplestilzken opened 10 years ago

rumplestilzken commented 10 years ago

It seems like the Makefile is not longer able to work on OSX 10.7.5.

I keep getting issues along the lines of :

In file included from src/c/luajava.c:39: src/c/luajava.h:2:17: error: jni.h: No such file or directory

It seems that in the switch from Apple to Oracle, things have been moved.

ckaminski commented 10 years ago

There's no hardcoding of the paths to the headers in the Makefile that I can see. Assuming you have a JDK installed you could simply symlink the jdk include directory to /usr/include and resolve that issue. If it was a Makefile change, you'd see a cc parameter such as -I/usr/java/include, which you don't. So I'm guessing you might only have a JRE installed.

Placeholder - I'll update when I'm on my Mac at home and can verify.

rodsenra commented 8 years ago

I have successfully compiled it on Mac OSX, altering the following lines in...

Makefile: $(SO_FILE): $(OBJS) export MACOSX_DEPLOYMENT_TARGET=10.11; $(CC) $(LIB_OPTION) -o $@ $? $(LIB_LUA)

config: INCS= -I$(JDK)/include -I$(JDK)/include/linux -I$(LUA_INCLUDES) -I$(JDK_HOME)/include -I$(JDK_HOME)/include/darwin