How to install OpenJDK 8 from source code
$ sudo yum install libXtst-devel libXt-devel libXrender-devel cups-devel alsa-lib-devel ccache
Download and configure JDK8
$ hg clone http://hg.openjdk.java.net/jdk8/jdk8/
$ cd jdk8
$ bash get_source.sh
$ bash configure
Be sure CLASSPATH and JAVA_HOME are not declared.
$ unset CLASSPATH
$ unset JAVA_HOME
$ make all
Now you can take a cup of coffee. The process takes around 10 minutes.
—– Build times ——-
Start 2014-02-03 14:55:12
End 2014-02-03 15:08:10
00:00:21 corba
00:00:15 demos
00:01:29 docs
00:07:08 hotspot
00:00:16 images
00:00:13 jaxp
00:00:18 jaxws
00:02:27 jdk
00:00:20 langtools
00:00:11 nashorn
00:12:58 TOTAL
————————-
Finished building OpenJDK for target ‘all’
$ cd ./build/linux-x86_64-normal-server-release/images/j2sdk-image/bin
$ ./javac -version
javac 1.8.0-internal
$ ./java -version
openjdk version “1.8.0-internal”
OpenJDK Runtime Environment (build 1.8.0-internal-juanjo_2014_02_03_14_55-b00)
OpenJDK 64-Bit Server VM (build 25.0-b69, mixed mode)
$ export PATH=/path/to/jdk8/build/linux-x86_64-normal-server-release/images/j2sdk-image/bin