See how you can simulate circuits in java here or follow the steps below:
The libraries are provided by Johan Vos and are available at strange and strangefx
Their uses are detailed in the code provided at quantum java
1) Choose your favourite spot in commandline
2) git clone https://github.com/arpanojha/c290_java.git
3) cd c290_java
4) source .quantum_set
5) chmod 755 c290.sh
6) ./c290.sh
7) echo “Et voila!”
You are now all set to enjoy simulating quantum circuits in Java
Additional installation methods are available at quantum computing for java developers