I have some code where I am making bar graph with the help of jfreechart.jar file its working ok in my local system but its not working in my server showing this error-
warning: [options] bootstrap class path not set in conjunction with -source 1.6
C:\report\CreateBarChart.java:13: error: package com.sun.image.codec.jpeg does not exist
import com.sun.image.codec.jpeg.JPEGCodec;
C:\report\CreateBarChart.java:14: error: package com.sun.image.codec.jpeg does not exist
import com.sun.image.codec.jpeg.JPEGEncodeParam;
C:\report\CreateBarChart.java:15: error: package com.sun.image.codec.jpeg does not exist
import com.sun.image.codec.jpeg.JPEGImageEncoder;
C:\report\CreateBarChart.java:179: error: cannot find symbol
JPEGImageEncoder encoder2 = JPEGCodec.createJPEGEncoder(fos);
symbol: class JPEGImageEncoder
location: class CreateBarChart
C:\report\CreateBarChart.java:179: error: cannot find symbol
JPEGImageEncoder encoder2 = JPEGCodec.createJPEGEncoder(fos);
symbol: variable JPEGCodec
location: class CreateBarChart
C:\report\CreateBarChart.java:180: error: cannot find symbol
JPEGEncodeParam param2 = encoder2.getDefaultJPEGEncodeParam(img);
I have added all required jar and import code but still its showing this error when I am going to buid jar. but its not showing error in netbeans only showing when I am going to build jar and working ok in local system so I am thinking this is server problem. I have added these jar -
jfreechart-1.0.13.jar
jfreechart-1.0.13-experimental.jar
jfreechart-1.0.13-swt.jar
so is it server problem or something else?
A bit late, but I think you're running a different JDK version than JFreeChart supports.
com.sun
is the internal Sun-jdk only classes. Those classes will work in Sun's JDK, but they will not in others like OpenJDK or IcedTea. They also are subject to change between versionsSolution: First, install Sun's JRE or make sure your already running Sun's. If that doesn't work, downgrade (or upgrade) to Java 6, as that's what it seems JFreeChart wants