I am not able to开发者_开发技巧 create thumbnails on linux environment in java application. Libraries which I am using this packages
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.Panel;
import java.awt.RenderingHints;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGEncodeParam;
import com.sun.image.codec.jpeg.JPEGImageEncoder;
to craete thumbnail
Graphics2D class to actually craete thumbnails.
This is working in windows environment and one of our linux machine also, but its not working in other linux machine whihch has no graphics crad in it.
Please advice and help.
Thanks in advance
Try to add the following system property on the command line that launches your program:
-Djava.awt.headless=true
精彩评论