I have a CentOS 5.2 32-bit machine, which I can't connect to the internet.

As Java Oracle does not seem to work, I would like to try using OpenJDK, but therefore I need to install OpenJDK first (which means that I need to download the binaries first).

On the internet, I have found several places where I can find the source code. I have also found numerous sites which mention the usage of "yum install".

However, as I don't have a connection to the internet I need to have the binaries (e.g. in a rpm package).

Does anybody know where I could find this for my system?

Thanks

  • 2
  • Thanks a lot for your quick reply, David. I've upvoted your comment as this site contains quite some interesting RPM packages. Unfortunately I have already visited this site, and the only RPM I found which looked useful was "java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el5_10.i386.rpm". I have tried to install this but I ended up with the error message that some other files are missing: error: Failed dependencies: libgif.so.4 is needed by java-1.7.0-openjdk-1.7.0.65-2.5.1.2.el5_10.i386 tzdata-java is needed by <idem> I prefer not to end up in a cascade of failing dependencies. – Dominique Mar 21 '16 at 10:40
up vote 3 down vote accepted

1. Download OpenJDK:

i.e. from RPMFind (as notice @DavidPostill)

2. Transfer via Flash drive \ WinSCP \ SCP \ SFTP to VM and install

yum -y install path-to-your-rpm-file

or

rpm -ivh path-to-rpm

3. Test java version:

java -version

If you needed you can switch java version with

alternatives --config java

  • Thanks for the information. Meanwhile my problems are solved. Just one remark: I had forgotten to mention that the CentOS is not a real machine, but a virtual one, located on my PC. In order to do the file transfer, I'm working with a mounting point, referring to my PC. – Dominique Mar 24 '16 at 10:08

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.