Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

During installation of Netbeans 7.3 I got this message

the specified jdk folder does not contain jdk

I have openjdk 7 installed on my system using apt-get. I tried to specify the path to /usr/lib/jvm/java-7-openjdk-i386 and also tried to /usr/lib/jvm/java-7-openjdk-i386/bin but nothing works. What should I do?

share|improve this question
Have a look at This it might help. – Mitch May 27 '13 at 8:05
up vote 9 down vote accepted

Got the solution. As openjdk documentation says I installed openjdk using

sudo apt-get install openjdk-7-jre

But it's not complete installation. After that I used this command

sudo apt-get install openjdk-7-jdk

It installs several extra packages. After that netbeans find jdk automatically and normal installation completed smoothly...

share|improve this answer
So you did not have the jdk installed? :/ – Bruno Pereira May 27 '13 at 10:27
During openjdk installation I don't know about the second command as I installed it reading an article. – Nabil May 27 '13 at 14:39

You need to set the JAVA_HOME path.

Open /etc/profile with you favorite text editor, ie

gksudo gedit /etc/profile

Navigate to the end of the file and add these contents

export JAVA_HOME
export JAVA_BIN
export PATH

Reload your system wide PATH /etc/profile with

. /etc/profile

As an option, you can run the installer with the --javahome option pointing to the /usr/lib/jvm/java-7-openjdk-i386 path as such --javahome /usr/lib/jvm/java-7-openjdk-i386

this will force the installer to use that path for the Java version you desire.

share|improve this answer
Last command should be ./ --javahome /usr/lib/jvm/java-7-openjdk-i386 ===but no, it's not working. Same result. – Nabil May 27 '13 at 8:23
What are the contents of the java-7-openjdk-i386 folder? – Bruno Pereira May 27 '13 at 8:46
Thanks but I got the solution. – Nabil May 27 '13 at 9:22

for me it works. I installed Netbeans 8 and it ask me to join the jd path.

I used the first answer:

sudo apt-get install openjdk-7-jdk


sh (suppose I'm in the /home/MYNAME/Download/ where I downloaded .sh file)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.