This program writes in a file all the prime numbers between 2 and an user defined cap (which cannot be major than Long.MAX_VALUE).
The software can be run by terminal with the command "java -jar PrimeNumbers.jar" optionally followed by the two args (which, if not included, will be asked later): the max value as an integer argument and the second as the file name.
If you are on Windows you can simply use the PrimeNumbers.exe which may be easier to start.