Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
sooty@sooty-desktop:~/soft/linux$ ./netbeans-6.8-ml-linux.sh
Configuring the installer...
Searching for JVM on the system...
Java SE Development Kit (JDK) was not found on this computer
JDK 6 or JDK 5 is required for installing the NetBeans IDE. Make sure that the JDK is properly installed and run installer again.
You can specify valid JDK location using --javahome installer argument.
To download the JDK, visit http://java.sun.com/javase/downloads
So, I have the jdk-6u18-linux-i586.bin file and a jdk-6u18-linux-i586-rpm.bin file.
Thus I should install one of them I guess. I did the following and got:
Code:
sooty@sooty-desktop:~/soft/linux$ ./jdk-6u18-linux-i586.bin
Sun Microsystems, Inc. Binary Code License Agreement
for the JAVA SE DEVELOPMENT KIT (JDK), VERSION 6
and the rest of the license agreement. I agreed to the license agreement, but then got this:
Code:
Please enter "yes" or "no".
Do you agree to the above license terms? [yes or no]
yes
Unpacking...
./jdk-6u18-linux-i586.bin: 447: cannot create install.sfx.9605: Permission denied
Checksumming...
/usr/bin/sum: install.sfx.9605: No such file or directory
[: 474: -ne: unexpected operator
[: 474: -ne: unexpected operator
chmod: cannot access `install.sfx.9605': No such file or directory
Extracting...
./jdk-6u18-linux-i586.bin: 477: ./install.sfx.9605: not found
Failed to extract the files. Please refer to the Troubleshooting section of
the Installation Instructions on the download page for more information.
I came across the Java 6 SDK Installation Notes, but it didn't seem to have a troubleshooting heading.
A friend downloaded the files for me. Could it be incorrectly downloaded? Or do I need root permission?
If you are installing on Fedora, I recommend the rpm.bin; if ubuntu, then it is more convenient to install from the repositories. In either case, you will need to work as root (or use sudo).
jamescondron: I'm doing it in my home directory. I know this is not preferable. However, I installed Ubuntu 9.10 a few days ago, and I don't quite get how I'm supposed to change to root. Since I installed it, I thought that I was root, but it seems there is something different on Ubuntu than on Fedora.
So perhaps, my problem will be solved if I could be enlightened on how to become root, 'cause then I would have the permission and be able to install it in a different directory.
Welcome to a command that will suddenly make everything simpler; 'sudo'.
There are many options to sudo, the man page is a good place to start, but basically running
Code:
sudo command
will run 'command' as if root had done so.
That being said, you should have ownership on your home directory- put it this way, theres very little chance of accidentally messing that up Are you using the instructions at https://help.ubuntu.com/community/Netbeans? And are you absolutely you need the bleeding edge NetBeans? The NetBeans in the repository may not be the bang up to date one, which is because Ubuntu, by virtue of being Debian based, requires a helluva lot of testing before a package can be put in one of their repositories.
The beauty, though, of this is that you allow the system to pull in the dependencies and so on.
I want to thank both of you very heartily for your help, and um... patience!
Yes, sudo does make life simpler, though I guess not necessarily easier or safer...
jamescondron: I have looked at the ubuntu-netbeans link and it will help me a lot. I probably don't need the bleeding edge version, but that's what is installed on the campus computers and what my friend had downloaded for me.
I agree that it would be better to install the version from the repository, but I have limited Internet credits. Um, do you perhaps know how big the netbeans package is?
I would like to try to get it installed from the files that I got from my friend's CD, before I download it from the repository.
Okay, so I sudo-ed the jdk install, and I got a
Code:
Java(TM) SE Development Kit 6 successfully installed.
and
Code:
sooty@sooty-desktop:~/soft/linux/jdk1.6.0_18$ ls
bin jre README_ja.html sample
COPYRIGHT lib README_zh_CN.html src.zip
db LICENSE register.html THIRDPARTYLICENSEREADME.txt
demo man register_ja.html
include README.html register_zh_CN.html
However, when I try to install netbeans, it still doesn't find the JDK, and "which java" and "which javac" returns nothing, and I tried to compile a little java program, and (not surprisingly) it gives me this:
Code:
sooty@sooty-desktop:~/Programs$ javac HelloTester.java
The program 'javac' can be found in the following packages:
* openjdk-6-jdk
* ecj
* gcj-4.4-jdk
* gcj-4.3
* jikes-classpath
* jikes-kaffe
* kaffe
* sun-java6-jdk
Try: sudo apt-get install <selected package>
javac: command not found
Could someone just please relieve me from my ignorance? I thought that I had installed the JDK, or what? Probably I should set the PATH variable for the JDK or something? I just don't know exactly to what it should be set.
I'm about to show you something which, in the case of internet credits, may make things a lot easier. See, the .deb for all ubuntu packages can be found on the ubuntu packages website and it has a size indicator, check out http://packages.ubuntu.com/hardy/netbeans
You can quickly verify that it is installed, and get the dir, with the locate command
Code:
locate javac
You'll probably get a few results, hopefully the one you want should be obvious enough, but if it isn't just post the output for us
EDIT:
I just installed the openjdk package, although on a debian box, and it put everything where it ought to be, which is odd. How did you install it? Did you use apt-get?
Last edited by jamescondron; 03-10-2010 at 01:09 PM.
Reason: as above
Yes, netbeans can be installed from the repositories. Still, I prefer the "original" because a) it offers more options and b) getting tomcat, mysql and some other softwares to work nicely with the netbeans package in the repositories can be quite a chore.
@azawa
You must unwittingly have installed a different java version before you installed sun java. The solution in this case is to install galternatives (which will appear under Applications > System Tools) and switch from whichever java is currently your default to sun java. Alternatively, you can work from the command line to achieve the same result (see the update-alternatives man page for details)
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.