February 8, 2014

Configure OpenJDK Source Code From Eclipse on RHEL 6

Introduction

In most Linux distribution is the source code for OpenJDK already available via RPM or Debian Package, but not for RHEL 6. The reason is probably the RHEL 6 main aim is for server OS and not for client development. Anyhow here is the way to make the source code available in Eclipse.

Installation

First you need to download the source zip from http://download.java.net/openjdk/jdk7/.

Then move the zip to the java home directory and name it src.zip.

Finally restore SELinux security policy.

Test

If everything works fine, you should now be able to browse the java source code from Eclipse.

Troubleshoot

If the source code is not directly found, you might need to adjust the java home search path.

If that did not help, you could also verify the path to the source zip.

Finally you might need to restart Eclipse (I did not). Happy coding!

No comments: