图片压缩windows下正常,linux服务器报java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/JPEGCodec
// JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); // encoder.encode(mBufferedImage);
替换为
ImageIO.write(mBufferedImage,"jpeg",out);
图片压缩windows下正常,linux服务器报java.lang.NoClassDefFoundError: com/sun/image/codec/jpeg/JPEGCodec
// JPEGImageEncoder encoder = JPEGCodec.createJPEGEncoder(out); // encoder.encode(mBufferedImage);
替换为
ImageIO.write(mBufferedImage,"jpeg",out);