• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Installation of Java in Linux

 
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Greenhorn
Posts: 4
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Mike London
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'll let you know.
Thanks.
-- Mike
 
Mike London
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
Bartender
Posts: 1971
17
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem turned out to be that I needed to do a chmod a+x instead of u+x.
Thanks.
-- Mike
 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Moving this to Linux/Unix forum where it will do more good.
 
Ranch Hand
Posts: 65
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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
 
Saloon Keeper
Posts: 27762
196
Android Eclipse IDE Tomcat Server Redhat Java Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic