Running a fortran program from java

In this post I write an example about how to launch a fortran executable form a java program passing some arguments and getting back a result.
The chosen example uses code written in fortran to get primes, it is from Sieve of Eratosthenes.