Contents

General tips

System memory

Java loves memory. If you do not plan to use desktop enviroment / XBMC run sudo raspi-config select memory_split and decrease GPU memory to 16. You'll get more than 100 Mb of additional system memory.

Swap file

Do not swap! Manage your JVM memory consumption with -ms and -mx keys. If you absolutely have to swap move swap file (/var/swap) to USB HDD of fast flash drive because swapping to SD card is painfully slow. You can set swap size in /etc/dphys-swapfile config file.

Overclocking

Installing Java on Raspberry Pi

Oracle Java 8

Oracle JDK 8 for ARM has JIT compiler and supports hard float point instructions. This is the fastest (1.5x-10x times faster than other JVMs) Java option for Raspberry Pi. Please note that Java 8 is still in beta stage and may be less stable than Java 7. You can install it on standard Raspbian system.