
| Dxter | Apr 11, 5:51am | | Is there any way to install Java in Linux with involving the root account? |
|
|
 Sponsor | konradc | Apr 11, 6:20am | I assume you had a typo and you mean "without" the root account? If so ...
* Download jdk-6u5-linux-i586.bin (not the rpm) from java.sun.com [java.sun.com]
* chmod 700 jdk-6u5-linux-i586.bin
* ./jdk-6u5-linux-i586.bin
* The above will create a directory called jdk1.6.0_05/ where your Java will reside.
* If you want to reference your own Java install, point the scripts to jdk1.6.0_05/jre/bin/java or you can add it to your PATH variable |
|
|

| Dxter | Apr 11, 7:28am | #2: Ya i had a typo. i meant "without" the root account.
Actually i downloaded jre-6u5-linux-i586.bin from java.sun.com itself.
i even changed the permissions as required and when i typed ./jre-6u5-linux-i586.bin in the terminal, the conditions page came too. The extraction, checksumming, creating, linking all started but everything came to a halt at the line
Creating jre1.6.0_05/lib/rt.jar and the pc got hanged up.
Is there any difference between the package i downloaded ie jre-6u5-linux-i586.bin(18.8 MB) and the one u recommended jdk-6u5-linux-i586.bin(67.2 MB)?
i downloaded the one u told but same thing happened with that one too. In fact it came to a halt at the time of extracting only.didnt proceed any further.
hope i am clear this time. |
|
|
 Sponsor | konradc | Apr 11, 7:52am | JRE is the Java Runtime Engine
JDK is the Java Development Kit
JRE only allows you to run java programs but JDK allows you to do that plus develop Java apps. JDK has the javac and other binaries.
Can you elaborate on "PC got hanged up"? |
|
|

| Dxter | Apr 12, 2:12am | ya by hanged up i mean that after the following line appeared, the pc didnt write anything else and the pointer in the terminal kept blinking. it simply hanged.
Creating jre1.6.0_05/lib/rt.jar
Should i have waited for some more time or is there some other problem? |
|
|
 Sponsor | konradc | Apr 12, 7:32am | 1. Do you have enough space?
2. Is the file downloaded correctly? The md5 hash I have is:
f7528500c17c09546566e05988beda86 jdk-6u5-linux-i586.bin
The extraction process shouldn't take too long. If it still doesn't work, you could try extracting it on another Linux machine, "tar jcf" it and transfer it over and extract. |
|
|

| Dxter | Apr 12, 8:11am | Regarding space, when i type "ulimit" in the terminal, it returns "unlimited", so i think enough space is available , at least for the extraction.
i think its better to go for the jre one instead of the jdk as the former one is much smaller in size than the jdk.i suppose there is no problem with that.
Well can u let me know how to find out the md5 hash. |
|
|
 Sponsor | konradc | Apr 12, 12:06pm | > i think its better to go for the jre one instead of the jdk as the former one is much smaller in size
It all depends what you're trying to do. If you don't have a need to develop Java apps, JRE is sufficient.
fyi, ulimit is not the right command for finding out how much disk space you have. Try "df -h" instead and look for the filesystem you are currently at.
To find the md5 hash, run the command "md5sum file" |
|
|

| Dxter | Apr 14, 3:10am | This time i removed some of my files from the disk to ensure that there is enough space for the Java extraction and installation, but the previous problem recurred.
It stopped at the following line(like last time as i told in #3):
Creating jre1.6.0_05/lib/rt.jar
Later when i tried to extract the file rt.jar from the GUI and not through the terminal,it displayed an error message saying
"An error occurred while extracting files"
The associated command line output was as follows
"End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /home/user/jre1.6.0_05/lib/rt.jar or
/home/user/jre1.6.0_05/lib/rt.jar.zip, and cannot find /home/user/jre1.6.0_05/lib/rt.jar.ZIP, period."
Well the md5 hash is
5198dd2a95a87587b0d9824d68f577cf jre-6u5-linux-i586.bin
Also after the failed installation,when i opened the directory from the GUI, i noticed that many files created during the extraction process didn't have the write and execute permissions for the owner. So i changed the permissions by the following command
chmod -R 700 directory name
Hope this time the problem will be sorted out :-) |
|
|
 Sponsor | konradc | Apr 14, 6:22am | The md5 hash looks correct.
It looks like you're trying to unzip the .bin file and encountering problems? You should run the .bin file and not just unzip it either with the unzip command or with the GUI archive manager. Regardless, the command should still work, just not yield the right files ...
Try running the .bin file on another Linux computer, tarball the directory and bring it over as suggested in post #6 |
|
|
|