To be able to run Java on your system, you would need the Java SE Development IDE and also perhaps NetBeans. Personally I use NetBeans. That is my preference! And below, some sample programs.
GCD - To compute the GCD of two integers input at the leyboard.
SquareRoot - To compute the square root of a number
Horner - Evaluation of a polynomial using Horner's method
Symmetric Group - A fairly complex program to list the elements of S3
Enjoy!