I want to know how I can write a Java program for Random Image Rotation. Now I have looked online, spent time researching, however I cannot find exactly what I need.

I need a Random Image Script that will Display an image on my webpage (which when clicked on, links to the image). The image will change on Refresh. I want the script to be able to pull the random images from a folder "Images" and to randomly pick an image in the folder and display it. The images can be named whatever they want to be, and there is no limit/restrictions on numbers. all are .jpg though.

Anyone able to help me out? Since every bit of Java Random image rotation tutorials/scripts I find online are all where you have to either A: List all your images in the file, or B: Name every image the same way.