Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Cannot find Java. Please use --jdkhome to switch the jdk path

  1. #1
    Join Date
    Jun 2014
    Location
    Costa Rica
    Beans
    31

    Exclamation Cannot find Java. Please use --jdkhome to switch the jdk path

    Hello everyone!

    This error shows up when I try to run Netbeans (OS independent Zip) and I have no idea what could be the problem. I do have installed java jdk 7 in my computer but this path :
    netbeans_jdkhome="/usr/lib/jvm/java-7-openjdk-i386"

    This path doesn't work, I mean "java-7-openjdk-i386" is the folder where is located. So, Wheter I'm writing the wrong path or I have to add something to it I need your help!! How can I do to make it work? PD: I'm using lubuntu 14.04

  2. #2
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    2,165
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Cannot find Java. Please use --jdkhome to switch the jdk path

    This NetBeans wiki hints that that netbeans_ jdkhome should point somewhere in /usr/bin rather thant in /usr/lib.
    Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.

  3. #3
    Join Date
    Jun 2014
    Location
    Costa Rica
    Beans
    31

    Re: Cannot find Java. Please use --jdkhome to switch the jdk path

    Thank you ofnuts but unfortunately usr/bin also doesn't work, at least, when you say "it should point somewhere" inside the folder bin, so what archive should I put? I tried with usr/bin/java to fix it, however, as I mentioned it doesn't worked too!
    I thing my problem is I am putting the wrong path because I don't know if I should put the whole folder where java jdk is located or directly to the archive...
    In conclusion, Can you help me to write the correct path to jdk?

  4. #4
    Join Date
    Aug 2011
    Location
    47°9′S 126°43W
    Beans
    2,165
    Distro
    Kubuntu 14.04 Trusty Tahr

    Re: Cannot find Java. Please use --jdkhome to switch the jdk path

    Do you have a directory /usr/lib/jvm/java-7-openjdk-i386? If so do you have a /usr/lib/jvm/java-7-openjdk-i386/bin/javac?

    By the way are you really meaning to use the 32-bit version? Normally you have a /usr/lib/jvm/default-java which should be a link to the JDK to use.
    Warning: unless noted otherwise, code in my posts should be understood as "coding suggestions", and its use may require more neurones than the two necessary for Ctrl-C/Ctrl-V.

  5. #5
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,273
    Distro
    Kubuntu

    Re: Cannot find Java. Please use --jdkhome to switch the jdk path

    Quote Originally Posted by ofnuts View Post
    This NetBeans wiki hints that that netbeans_ jdkhome should point somewhere in /usr/bin rather thant in /usr/lib.
    I have never seen, nor had, this issue. Perhaps it was because I had JAVA_HOME defined to the location where I had my Java JDK installed.

    Note, under Linux systems, the JDK package can be installed anywhere one wishes to install it.

    P.S. I also define JDK_HOME to be the same as my JAVA_HOME; it's probably redundant, but some scripts I run use one or the other.

  6. #6
    Join Date
    Jun 2014
    Location
    Costa Rica
    Beans
    31

    Re: Cannot find Java. Please use --jdkhome to switch the jdk path

    I just wrote the path like this: usr/lib/jvm/java-7-openjdk-i386/jre and netbeans loaded(very slow but it loaded), nevertheless, another problem just came out, some modules can't load. Would it be the same problem? I hope no...

    P.D. I tried usr/lib/jvm/defalut-java also and the same situations with modules.
    Last edited by dylan0005; August 11th, 2014 at 01:24 AM.

  7. #7
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,273
    Distro
    Kubuntu

    Re: Cannot find Java. Please use --jdkhome to switch the jdk path

    Quote Originally Posted by dylan0005 View Post
    I just wrote the path like this: usr/lib/jvm/java-7-openjdk-i386/jre and netbeans loaded(very slow but it loaded), nevertheless, another problem just came out, some modules can't load. Would it be the same problem? I hope no...
    Probably not. Just open another thread.

    P.S. Have you tried to build your project without the need of an IDE? It would not hurt you to learn how the silly IDE does things.

  8. #8
    Join Date
    Jun 2014
    Location
    Costa Rica
    Beans
    31

    Re: Cannot find Java. Please use --jdkhome to switch the jdk path

    mmm.. not yet. How's it work?

    It shows me "netbeans runs without JDK, just with JRE" and It asks me for the location of JDK. I don't know what else to do with that path...
    Last edited by dylan0005; August 11th, 2014 at 01:42 AM.

  9. #9
    Join Date
    Jun 2007
    Location
    Maryland, US
    Beans
    6,273
    Distro
    Kubuntu

    Re: Cannot find Java. Please use --jdkhome to switch the jdk path

    Netbeans runs with a JRE, however if you want to develop Java applications, then eventually you will need to compile them with a JDK.

  10. #10
    Join Date
    Jun 2014
    Location
    Costa Rica
    Beans
    31

    Re: Cannot find Java. Please use --jdkhome to switch the jdk path

    I see... I just need that netbeans can recognize and find JDK.. the question is: Which could it be the correct path? I'm frustrated, nothing works
    Last edited by dylan0005; August 11th, 2014 at 10:27 PM.

Page 1 of 2 12 LastLast

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •