#10 "jni.h not found" when compiling library-src on linux

Crash (2)

I got this error when compiling under linux (openSUSE 11.4 - KDE 4.6.2) version 0.3b of ClipsJNI library sources.
I've attached the complete output from terminal, here i report only the interesting lines...

fra@fra-notebook:/media/Dati/FRA/Scuola/IAlab/EstensioneClipsJNI/CLIPSJNI/library-src> make -f makefile.linux
gcc -o libCLIPSJNI.so -shared -Wall -I/opt/sun-j2sdk-1.4.2/include -I/opt/sun-j2sdk-1.4.2/include/linux -lm agenda.o analysis.o argacces.o bload.o bmathfun.o bsave.o classcom.o classexm.o classfun.o classinf.o classini.o classpsr.o clsltpsr.o commline.o conscomp.o constrct.o constrnt.o crstrtgy.o cstrcbin.o cstrccom.o cstrcpsr.o cstrnbin.o cstrnchk.o cstrncmp.o cstrnops.o cstrnpsr.o cstrnutl.o default.o defins.o developr.o dffctbin.o dffctbsc.o dffctcmp.o dffctdef.o dffctpsr.o dffnxbin.o dffnxcmp.o dffnxexe.o dffnxfun.o dffnxpsr.o dfinsbin.o dfinscmp.o drive.o edbasic.o edmain.o edmisc.o edstruct.o edterm.o emathfun.o engine.o envrnmnt.o evaluatn.o expressn.o exprnbin.o exprnops.o exprnpsr.o extnfunc.o factbin.o factbld.o factcmp.o factcom.o factfun.o factgen.o facthsh.o factlhs.o factmch.o factmngr.o factprt.o factqpsr.o factqury.o factrete.o factrhs.o filecom.o filertr.o generate.o genrcbin.o genrccmp.o genrccom.o genrcexe.o genrcfun.o genrcpsr.o globlbin.o globlbsc.o globlcmp.o globlcom.o globldef.o globlpsr.o immthpsr.o incrrset.o inherpsr.o inscom.o insfile.o insfun.o insmngr.o insmoddp.o insmult.o inspsr.o insquery.o insqypsr.o iofun.o lgcldpnd.o memalloc.o miscfun.o modulbin.o modulbsc.o modulcmp.o moduldef.o modulpsr.o modulutl.o msgcom.o msgfun.o msgpass.o msgpsr.o multifld.o multifun.o objbin.o objcmp.o objrtbin.o objrtbld.o objrtcmp.o objrtfnx.o objrtgen.o objrtmch.o parsefun.o pattern.o pprint.o prccode.o prcdrfun.o prcdrpsr.o prdctfun.o prntutil.o proflfun.o reorder.o reteutil.o retract.o router.o rulebin.o rulebld.o rulebsc.o rulecmp.o rulecom.o rulecstr.o ruledef.o ruledlt.o rulelhs.o rulepsr.o scanner.o sortfun.o strngfun.o strngrtr.o symblbin.o symblcmp.o symbol.o sysdep.o textpro.o tmpltbin.o tmpltbsc.o tmpltcmp.o tmpltdef.o tmpltfun.o tmpltlhs.o tmpltpsr.o tmpltrhs.o tmpltutl.o userdata.o userfunctions.o utility.o watch.o CLIPSJNI_Environment.c
In file included from CLIPSJNI_Environment.c:2:0:
CLIPSJNI_Environment.h:2:17: fatal error: jni.h: No such file or directory
compilation terminated.
make: *** [libCLIPSJNI.so] Errore 1

Looking into the CLIPSJNI_Environment.h file, I've found that there is an inlude on this file jni.h, but the file is not present in the directory... any hint?


  • Nobody/Anonymous

    complete make command output

  • Nobody/Anonymous

    This is not a bug, you should change line 39 of your makefile.linux according to where you have installed java on your system.
    You should change both the path to include directory and the path to include/linux directory.

  • Gary Riley

    Gary Riley - 2013-08-30

    As pointed out, jni is part of the java install so the makefile needs to be modified to reference that directory.

  • Gary Riley

    Gary Riley - 2013-08-30
    • status: open --> closed

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks