I want a java code for getting histogram from grayscale image [on hold]

For our project, we need to get histogram equalised image from grayscale image. So we need a java code for that… & within the images, an output should also provide the graph for that image. So can we get that?