This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 206774 - [JDK 7] package com.sun.image.codec.jpeg does not exist
Summary: [JDK 7] package com.sun.image.codec.jpeg does not exist
Alias: None
Product: java
Classification: Unclassified
Component: Project (show other bugs)
Version: 7.0.1
Hardware: PC Windows XP x64
: P3 normal (vote)
Assignee: Tomas Zezula
Depends on:
Reported: 2011-12-28 16:40 UTC by yding
Modified: 2014-03-05 04:39 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Note You need to log in before you can comment on or make changes to this bug.
Description yding 2011-12-28 16:40:18 UTC
----- screen shot --------
Compiling 451 source files to C:\Documents and Settings\yding\My Documents\NetBeansProjects\GuessWeb\build\classes
warning: [options] bootstrap class path not set in conjunction with -source 1.6
C:\Documents and Settings\yding\My Documents\NetBeansProjects\GuessWeb\src\com\hp\hpl\guess\piccolo\ error: package com.sun.image.codec.jpeg does not exist
import com.sun.image.codec.jpeg.*;

----- problem description --------
NetBean can not found "com.sun.image.codec.jpeg" which is in rt.jar. The above is from my 64bit Window XP computer. My other 32bit computer works without problem.
Comment 1 Jesse Glick 2011-12-28 17:52:14 UTC
Reproducible in a plain Java SE project by adding e.g.

import com.sun.image.codec.jpeg.JPEGCodec;

to any source, but only when building on JDK 7. .../jdk7/bin/javap com.sun.image.codec.jpeg.JPEGCodec succeeds. Seems that JDK 7 javac just blocks access to this package - not an IDE issue.
Comment 2 yding 2011-12-28 19:33:10 UTC
Thanks for the reply. It is jdk 1.7 problem. 
Change netBean to use 1.6 platform solved the problem.
Comment 3 m_jaggard 2012-11-21 13:49:07 UTC
For those who find this using Google. You can overcome this problem by specifying an additional compiler option (under Project properties -> Build -> Compiling)

Comment 4 zzzywcwy 2014-03-05 04:39:31 UTC
I found a very useful JPEGCodec image library (totally free with trial). It may also counts. 

Check this out: