Recently for my COMP435 course, I created a Bitmap to JPEG Java utility which uses Java Advanced Imaging. The utility opens a bitmap image and then displays the original image on the left side in a ScrollingImagePanel and on the right side is shown the converted JPEG image. Below is a sample screenshot of it working.
Notice there are buttons for zooming in on each image separately and plus there is buttons to set either constant values or DC only values for the JPEG quantization table (both luminace and chrominance).