sudo emerge --ask 	dev-java/oracle-jdk-bin
#accept license
sudo etc-update


[[32;01m*^[[0m Oracle requires you to download the needed files manually after
 ^[[32;01m*^[[0m accepting their license through a javascript capable web browser.
 ^[[32;01m*^[[0m Download the following files:
 ^[[32;01m*^[[0m   jdk-8u112-linux-x64.tar.gz
 ^[[32;01m*^[[0m at ''
 ^[[32;01m*^[[0m and move them to '/usr/portage/distfiles'


sudo cp jdk-8u112-linux-x64.tar.gz /usr/portage/distfiles/
sudo emerge --ask 	dev-java/oracle-jdk-bin
riguz@riguz ~ $ java -version
java version "1.8.0_112"
Java(TM) SE Runtime Environment (build 1.8.0_112-b15)
Java HotSpot(TM) 64-Bit Server VM (build 25.112-b15, mixed mode)