Thursday, March 20, 2014

Make Shopizer working on JDK7

Step1: Download and unzip

Step2: Import all projects to Eclipse

Step3: Build sm-core
Initially, solve the loadbuild issue. Here are the fixes.
1. Add "includeantruntime=false" for javac command
2. For the class "com.salesmanager.core.util.www.ImageCaptchaServlet", replace the depressed classes "com.sun.image.codec.jpeg.JPEGCodec" with the class "javax.imageio.ImageIO".
//import com.sun.image.codec.jpeg.JPEGCodec;
//import com.sun.image.codec.jpeg.JPEGImageEncoder;
import javax.imageio.ImageIO;
import javax.imageio.ImageWriter;

/* // a jpeg encoder
JPEGImageEncoder jpegEncoder = JPEGCodec
.createJPEGEncoder(jpegOutputStream);
jpegEncoder.encode(challenge);
*/
// Image writer
ImageWriter imageWriter = (ImageWriter) ImageIO.getImageWritersByFormatName("JPEG").next();
   imageWriter.setOutput(jpegOutputStream);
   imageWriter.write(challenge);

Step4: Build sm-shop
1. Add "includeantruntime=false" for javac command
2. For the class "com.salesmanager.customer.profile.LogonAction", replace the depressed classes "com.sun.image.codec.jpeg.JPEGCodec" with the class "javax.imageio.ImageIO".

Step5: Build sm-central

Step6: Build media.  

Having trouble