1

I need to install a specific older version of JRE on a RedHat machine.

So I downloaded jre-1_5_0_10-linux-i586.rpm and copied it into /opt/local. Then I ran sh ./jre-1_5_0_10-linux-i586-rpm.bin and finally I installed it using rpm -ivh jre-1_5_0_10-linux-i586.rpm.

Next I copied the jre into my application folder /usr/java/jre1.5.0_10 /opt/local/myapp/. Finally when I tried to set the alternatives --install as per this command:

alternatives --install /usr/bin/java java /opt/local/mpapp/jre1.5.0_10/bin/java 1

And I got en error no such file or directory?

What could have gone wrong why is the /usr/bin/java link is not created?

1
  • Are you sure that path /opt/local/mpapp/jre1.5.0_10/bin/java exists and the rpm was installed successfully. Please show us the output these commands ls -l /opt/local/mpapp/jre1.5.0_10/ , which java , rpm -qa | grep -E "jre|java|jdk" Feb 23, 2016 at 6:43

1 Answer 1

1

Switch to the directory where you saved the file and execute the binary Change permission to make executable

chmod 755 jre-1_5_0_10-linux-i586-rpm.bin

Execute RPM, once the file has been executed and type "Yes" to accept the license agreement and allow it to finish the install.

Create a symbolic link like

ln -s /usr/java/jre1.5.0.10//bin/java java

or

ln -s /usr/java/jre1.5.0.10//bin/javac javac

Type java -version to confirm version and type rpm -qa | grep jre to confirm version against rpm database.

Download the file from Java's website with the correct self-extracting file for either 32 bit or 64 bit depending on your operating system.

Switch the directory to where you want file downloaded

Change permission to executable

Accept the license agreement.

Type java -version to confirm version.

1
  • after setting 755 permission which is the correct method to execute the RPM? After creating the symbolic link can I move the jre into myapp folder as per what I am doing currently? Feb 23, 2016 at 18:04

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .