Gentoo/Java Using IcedTea

Page last edited 3,790 days ago
From Alon Bar-Lev's Site
Jump to navigation Jump to search

Java Using IcedTea

dev-java/icedtea or OpenJDK can be used in order to build java from source, however there is egg and chicken scenario as icedtea needs java to be built, unfortunate the java herd does not help in the process, similar to sys-devel/crossdev.

This documents how to compile java the Gentoo way, build from sources.

Bootstrap

First we need a java in our system... we will use gcc's gcj.

File: /etc/portage/package.use/java-bootstrap.conf
sys-devel/gcc gcj
File: /etc/portage/package.accept_keywords/java-bootstrap.conf
dev-java/ecj-gcj ~amd64
emerge --oneshot sys-devel/gcc
emerge --update --deep --newuse @world
emerge dev-java/gcj-jdk

IcedTea

File: /etc/portage/package.use/my-java.conf
dev-java/antlr java
dev-java/icedtea -nsplugin -webstart -source
File: /etc/portage/package.accept_keywords/my-java.conf
dev-java/icedtea:6 ~amd64
emerge dev-java/icedtea
java-config --set-system-vm=icedtea-6

Cleanup

rm /etc/portage/package.use/java-bootstrap.conf /etc/portage/package.accept_keywords/java-bootstrap.conf
emerge --unmerge dev-java/gcj-jdk
emerge --update --deep --newuse @world
emerge --depclean

Maintainer

Alon Bar-Lev

Authors

Originally written by: Alon Bar-Lev - 2011-11-17


Authors are people who have worked on this document and have made significant changes to its content. If you have edited this article and wish to add yourself to the authors list please read "Who are Authors".