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

I have downloaded a .bin file for JDK and am trying to install it. I have used these commands:

chmod +x jdk-6u23-linux-i586.bin
sudo ./jdk-6u23-linux-i586.bin

and got this output:

sudo: ./jdk-6u23-linux-i586.bin: command not found
share|improve this question
thinking there's a typo in your command or a permissions error. it works for me with similar commands. it could also be some sudo weirdness. I ALWAYS use a rootshell instead of sudo. – RobotHumans Jan 14 '11 at 19:35
That error can also be shown when you try to execute a 32bits binary on a 64 bits system. – João Pinto Jan 14 '11 at 20:08
@aking1012, sudo -s do the same thing. – Thorbjørn Ravn Andersen Nov 28 '11 at 12:29
@ThorbjørnRavnAndersen - thanks for the heads up. good to know. – RobotHumans Nov 30 '11 at 14:06

To install Netbeans, you can simply install the netbeans install netbeans package. This will install everything Netbeans needs, including Java.

To install Java, but without installing Netbeans

If you want the proprietary version of Java, you need to:

To install these packages, use the Software Centre, which is available from the Applications menu.

share|improve this answer
i have solved my problem before reading your answers. – Muhammad Jan 16 '11 at 16:32
@user8900 - Please answer your own question outlining the steps you took to solve it. After 2 days, you can accept your own answer. – dv3500ea Jan 16 '11 at 16:35
dear i m not understanding what your are saying? can you voice chat with me? at skype . i am available at skype. – Muhammad Jan 16 '11 at 17:18
thnx for guidence.i got your instruction and follow them. – Muhammad Jan 16 '11 at 17:24

Netbeans is available from the Ubuntu software Center, you should install from there unless you have a strong reason to use a different version.

share|improve this answer
I have solved my problem before read your answers. Special Thanks to everybody have give me suggestions. so I have solved my problem in simple way. when i install ubuntu and i have already install OPEN JDK.i was trying to install sun jdk its giving me error. so after all , i uninstall Open jdk and restart machine and then extract file i have mention above .its successfully extracted and Netbean easly found jdk path. Now i m enjoying Java Development with Netbean. – Muhammad Jan 16 '11 at 16:37
One should be aware though that the ubuntu software centre version is the plain JavaSE version. – Gemtastic Jul 19 at 6:52

In future use these 2 scripts I wrote :D...

Java before Netbeans...


#Delete the line below if you only want the "open" JDK & JRE
sudo apt-get install openjdk-7-jdk openjdk-7-jre;

#Makes the /usr/lib/jvm in case...
sudo mkdir -p /usr/lib/jvm

#Clean out /tmp...
sudo rm -rf /tmp/*
cd /tmp

#Update this line to reflect newer versions of JDK...
tar -xvf ./*gz;

#Move it to where it can be found...
sudo mv /tmp/jdk1.7.* /usr/lib/jvm/;

#Add the new Java to the bin 
sudo update-alternatives --install /usr/bin/java java /usr/lib/jvm/jdk1.7.0_01/jre/bin/java 3;

#User chooses
sudo update-alternatives --config java;

exit 0;


# @author Yucca Nel
# Update as needed for newer Netbeans releases :D


#Clean out /tmp...
sudo rm -rf /tmp/*;
cd /tmp;

#Update this line to reflect newer versions of Netbeans or replace 'javase with 'javaee' or add jee manually via
#Netbeans 'plugins as needed.
sh /tmp/*sh;

#Add Netbeans launcher to your PATH. Doing so allows you to run 'netbeans' command from the terminal
sudo ln -s ~/netbeans-7.0.1/bin/netbeans /usr/local/bin/;

exit 0;
share|improve this answer
up vote 1 down vote accepted

Thank you for your help, but I solved my own problem.

When I installed Ubuntu and I installed OpenJDK. I was trying to install the Sun JDK, which led to the error.

I resolved the problem by uninstalling OpenJDK, restarting the machine, and then extracting the file mentioned above. It was successfully extracted and NetBeans easily found the JDK path.

Now I'm enjoying Java Development with NetBeans.

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.