# How to add Java in my FreeBSD Server 10



## blossom (Jun 10, 2015)

Hai, I am new for FreeBSD, please help me how to add Java with all module in FreeBSD Server?

Thanks


----------



## Remington (Jun 10, 2015)

Install OpenJDK8

`pkg install openjdk8`

Add the following to your home directory file ~/.cshrc:

```
setenv JAVA_HOME /usr/local/openjdk8/
setenv JRE_HOME /usr/local/openjdk8/jre
setenv LD_LIBRARY_PATH /usr/local/openjdk8/jre/lib/amd64/jli
```


----------



## SirDice (Jun 11, 2015)

I highly recommend reading the handbook: Chapter 5. Installing Applications: Packages and Ports.


----------

