Typically "resolution" means size. Do you mean the JPEG quality instead? That is the only way I can think of to compress it without resizing it.
If so, you can use the Java2D ImageIO API. Something like the following would work (adapted from this page):
BufferedImage bufferedImage = ImageIO.read(...);
ImageWriter writer = (ImageWriter)ImageIO.getImageWritersByFormatName("jpeg").next();
ImageWriteParam iwp = writer.getDefaultWriteParam();
iwp.setCompressionMode(ImageWriteParam.MODE_EXPLICIT);
iwp.setCompressionQuality(...);
File file = new File(...);
FileImageOutputStream output = new FileImageOutputStream(file);
writer.setOutput(output);
IIOImage image = new IIOImage(bufferedImage, null, null);
writer.write(null, image, iwp);
writer.dispose();
Unfortunately, I don't think there's a way to get the existing JPEG quality of an image, so you'll have to use some fixed value for the compression quality.