Did you try searching this forum? That question has been asked before: Upgrading to 1.12 / Java 1.8 / FreeNAS 9.10.2