Is there a Java library for rotating JPEG files (90/180/270 degrees) without quality degraded?
I found this: http://mediachest.sourceforge.net/mediautil/
API: http://mediachest.sourceforge.net/mediautil/javadocs/mediautil/image/jpeg/LLJTran.html
Rotation is inherently not reversible with the same fidelity due to rounding off in mapping function. Which means if you keep rotating, the quality will degrade.
In my opinion, ImageMagick is the premier piece of software to do this in. It's probably a bit of overkill for what you need, but the apis are amazing and you can pretty much do whatever you want to images with it.
Check out JMagick for the Java api.
You don't need an external library for this kind of thing, it's all built into SE. The easiest being the rotate() function of the Graphics2D object.
For example:
Image rotatedImage = new BufferedImage(imageToRotate.getHeight(null), imageToRotate.getWidth(null), BufferedImage.TYPE_INT_ARGB);
Graphics2D g2d = (Graphics2D) rotatedImage.getGraphics();
g2d.rotate(Math.toRadians(90.0));
g2d.drawImage(imageToRotate, 0, -rotatedImage.getWidth(null), null);
g2d.dispose();
no loss!
Or, if you want to be extra careful, just use BufferedImage.getRGB(x,y), and translate it pixel by pixel on to the new image.