Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
Skins
  • Light
  • Brite
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (Flatly)
  • No Skin
Collapse
Brand Logo

NetXMS Forum

  1. Home
  2. Support
  3. configure: error: *** Cannot find jni.h - check your JDK installation ***

configure: error: *** Cannot find jni.h - check your JDK installation ***

Scheduled Pinned Locked Moved Support
3 Posts 2 Posters 48.8k Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D
    D
    depierce
    wrote on last edited by
    #1

    Having a tough time figuring out how to get configure to see my JDK install.  Tried below with --includedir=/usr/lib/jvm/java-8-oracle as well.
    Edit: This is trying to build netxms-2.0-RC2 on Ubuntu 12.04.5 with Oracle's Java SDK version 1.8 installed.

    sh ./configure --prefix=/opt/netxms --with-server --with-snmp --with-client --with-client-proxy --with-agent --disable-ipv6 --with-jdk --with-mysql --with-openssl --with-gnu-ld
    ...
    configure: error: *** Cannot find jni.h - check your JDK installation ***

    java -version
    java version "1.8.0_66"
    Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
    Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

    DERBY_HOME=/usr/lib/jvm/java-8-oracle/db
    PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/lib/jvm/java-8-oracle/bin:/usr/lib/jvm/java-8-oracle/db/bin:/usr/lib/jvm/java-8-oracle/jre/bin:/usr/lib/jvm/java-8-oracle/include
    JAVA_HOME=/usr/lib/jvm/java-8-oracle
    J2SDKDIR=/usr/lib/jvm/java-8-oracle
    J2REDIR=/usr/lib/jvm/java-8-oracle/jre

    UPDATE/SOLVE:
    On a hunch that configure needs gcj glue to "find" java headers, went ahead and installed java-gcj-compat-headless and java-gcj-compat-dev and all dependencies.  Configure works now.

    1 Reply Last reply
    0
    • V
      V
      Victor Kirhenshtein
      wrote on last edited by
      #2

      Hi,

      alternatively, you can specify JDK location in --with-jdk parameter, like this:

      ./configure --with-jdk=/usr/lib/jvm/java-7-openjdk-amd64

      JDK location varies between distributions, this example is from Deian/Ubuntu.

      Best regards,
      Victor

      1 Reply Last reply
      0
      • D
        D
        depierce
        wrote on last edited by
        #3

        Hi, Victor.

        Actually I tried specifying with --with-jdk /usr/lib/jvm/java-8-oracle and also appending /include to path - neither worked.  Don't know if it's a limitation of the configure function to check java version but installing the gjc packages did the trick.

        1 Reply Last reply
        0

        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

        With your input, this post could be even better 💗

        Register Login
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        Powered by NodeBB Contributors
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • Users
        • Groups