aspose file tools*
The moose likes Linux / UNIX and the fly likes Installation of Java in Linux Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » Linux / UNIX
Bookmark "Installation of Java in Linux" Watch "Installation of Java in Linux" New topic
Author

Installation of Java in Linux

Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1083
Hi,
I'm trying to install the jdk1.4.1_01-linux-i586.rpm.bin file on my Linux box.
The problem is that no matter what I try I can't get it to install or unload.
Here's what I've tried so far:
1. RPM command like this:
RPM -i jdk1.4.1_01-linux-i586.rpm.bin
Result: Not a valid rpm file.
2. Tried to double click the file.
Result: Just get a textual listing about the file.
3. Tried to just type the file name at the prompt or with a ".\" prefix.
Result: Didn't work.
=============
I also tried to download the jdk1.4.1_01-linux-i586.bin version of the JDK and had similar problems extracting it.
Can anybody explain how to extract the JDK Linux download in Linux.
I'm new to Linux.
Thank you very much for any advice or suggestions.
-- Mike
Jeff Jensen
Greenhorn

Joined: Dec 18, 2002
Posts: 4
You should first unpack your bin-file. Do the following steps in a shell:
1. chmod u+x jdk1.4.1_01-linux-i586.rpm.bin
2. ./jdk1.4.1_01-linux-i586.rpm.bin
3. rpm -ivh jdk1.4.1_01-linux-i586.rpm
4. Set environment attribute JAVA_HOME
Hope this helps


best regards,<br /> <br />Jeff
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1083
I'll let you know.
Thanks.
-- Mike
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1083
Jeff,
Your suggestions didn't help. I think I may have a more basic problem.
Here's what happened:
1. chmod == worked fine. "rwx" was the result.
2. ./jdk1.4.1_01-linus.i586.rpm.bin -- resulted in "command not found".
3. rpm -ivh ... resulted in "No such file or directory".
The strange thing is that if I do a "dir" on the file, it's there. I then just bring up the last command (where I know I have the right file name) and try the other commands above.
The JDK file is in my home directory, but the rpm command is found if I just type it at a SU prompt.

I'm sure there's something very basic here I'm missing.
Any ideas?
Thanks.
-- Mike
P.S. I have Red Hat 8 with all the packages installed (and the lastest fixes).
Mike London
Ranch Hand

Joined: Jul 12, 2002
Posts: 1083
The problem turned out to be that I needed to do a chmod a+x instead of u+x.
Thanks.
-- Mike
Michael Ernest
High Plains Drifter
Sheriff

Joined: Oct 25, 2000
Posts: 7292

Moving this to Linux/Unix forum where it will do more good.
Chris De Vries
Ranch Hand

Joined: Dec 05, 2002
Posts: 65
I've always just skipped the rpm package and used the shell install jdk package. I just run the shell script in /usr/local and have not had any problems. Plus it's easy to have multiple jres or jdks on the system if you store them all in /usr/local. I'm not exactly sure how to maintain multiple jres using the rpm packages.
Chris
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16303
    
  21

Originally posted by Chris De Vries:
I've always just skipped the rpm package and used the shell install jdk package. I just run the shell script in /usr/local and have not had any problems. Plus it's easy to have multiple jres or jdks on the system if you store them all in /usr/local. I'm not exactly sure how to maintain multiple jres using the rpm packages.
Chris

For the Java SDK, RPM or shell install are equally good. RPMs are at their most useful when you're trying to install a package that infuses commands, libraries, docfiles, etc. into the standard system locations. The JDK works better off in its own directory subtree, though, so even a simple TAR or UNZIP operation suffices.
The "conventional" location for J2SDKs is in /usr/java, not /usr/local (nothing's hard-coded based on this, however) and the actual JDK is a subdirectory underneath that subtree, such as "/usr/java/j2sdk1.4.0". So I'd select the 1.4 SDK by doing a "JAVA_HOME=/usr/java/j2sdk1.4.0". Hopefully Sun's finally settling on a consistent naming scheme now, though that's mostly a matter for MY convenience, not my software's.
The RPMs also have the java version encoded in their package name, so my 1.4.0 J2SDK's RPM name is "j2sdk-1.4.0-fcs". Because of that, you can easily work with multiple J2SDK versions.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Installation of Java in Linux