i am going to Give you step by step instructions on how to correctly import CLIBS in linux
-
download CLIPS_jni from here.
-
have Java JDK mine is openJDK8.1.
-
Extract zip file.
-
go the library-src Directory and open terminal from that directory
-
here you are going to try running
make -f makefile.linux
if No errors appeared you are good to go but most probably it won't iw will crash while making libCLIPSJNI.so because your java environment variables an't setup correctly like mine :) so you have to follow the next steps.
- first you need to know the path of you JDK mine is in.
/usr/lib/jvm/java-8-openjdk-amd64/include
- next you are you going to open makefile.linux and replace the following
with the following but remember add your path not mine.
libCLIPSJNI.so : $(OBJS) net_sf_clipsrules_jni_Environment.c gcc -o libCLIPSJNI.so -fPIC -shared -Wall -I$(JAVA_INCLUDE) -I$(JAVA_INCLUDE_OS) \ -lm $(OBJS) net_sf_clipsrules_jni_Environment.c
as you have noticed already I added \linux in one of the paths the order isn't importantlibCLIPSJNI.so : $(OBJS) net_sf_clipsrules_jni_Environment.c gcc -o libCLIPSJNI.so -fPIC -shared -Wall -I /usr/lib/jvm/java-8-openjdk-amd64/include/linux -I/usr/lib/jvm/java-8-openjdk-amd64/include \ -lm $(OBJS) net_sf_clipsrules_jni_Environment.c
- then save and try execute the following command again
make -f makefile.linux
- first you need to know the path of you JDK mine is in.
-
a file named libCLIPSJNI.so will be generated copy it and paste it in the root directory CLIPSJNI.
-
now in the root directory CLIPSJNI execute the following comand
maek -f makefile.linux
-
now copy the libCLIPSJNI.so to
- /usr/lib/jvm/java-8-openjdk-amd64/lib/amd64
and to
- /usr/lib/jvm/java-8-openjdk-amd64/jre/lib/amd64
-
copy the CLIPSJNI.jar in the root directory CLIPSJNI to
- /usr/lib/jvm/java-8-openjdk-amd64/lib
and to
- /usr/lib/jvm/java-8-openjdk-amd64/jre/lib
now you can clone this repo and try run the project and test if it works or not
also you can run one of the demos using th follwoing command
java -jar WineDemo.jar