Spent the last 4 hours suffering, trying to compile JCurses, the Java Ncurses library on OSX Lion.
So here is the solution:
- Download the lib: http://sourceforge.net/projects/javacurses/files/javacurses/0.9.5/jcurses-src-0.9.5.tar.gz/download
- Unpack it
- ./configure; make
- You will have a problem around the Toolkit sources.src/native/include/jcurses_system_Toolkit.h:2:17: error: jni.h: No such file or directory
In file included from src/native/Toolkit.c:1:
src/native/include/jcurses_system_Toolkit.h:31: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘void’ - Reason one : Makefile has a wrong have home. so set it toJAVAHOME=/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents//Home/ instead ofJAVAHOME=/usr/
- Reason two : in Lion a symlink is missing to jni.h (actually a whole directory). Solution is: to go to /System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Home/, then sudo ln -s /System/Library/Frameworks/JavaVM.framework/Headers include
- You now have 2 files in lib, a jar and a so : jcurses.jar and libjcurses.so
- Include jcurses.jar in your project and you most likely want to have libjcurses.so in dist/lib (I am a netbeans user, so that is where I compile)
Credits go to Matt Gumbley for the last step: https://discussions.apple.com/thread/2630649?start=0&tstart=0
Hope it helps someone. You can see the compile list on the next page



