Follow this tutorial to make a modified package for Java: Modified Script to install Java SE 6 (Java ForOS)