javaWebChatroom you may need these two packages: com.sun.image.codec.jpeg.JPEGCodec; com.sun.image.codec.jpeg.JPEGImageEncoder;