Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

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?

share|improve this question

2 Answers 2

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 versions

Solution: 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

share|improve this answer

I think only an issue is adding those Jar files to CLASS_PATH on environment variables of system.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.