You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Juergen Lorenz Simon <si...@webtecc.com> on 2008/11/18 12:59:08 UTC

Why does Maven supress com.sun.image.codec.jpeg?

Hi,

I'm trying to compile some Java code with Maven and I've been knocking  
my head against
a problem all morning. The following list of imports fails to resolve:

import java.awt.Container;
import java.awt.Graphics2D;
import java.awt.Image;
import java.awt.MediaTracker;
import java.awt.RenderingHints;
import java.awt.Toolkit;
import java.awt.image.BufferedImage;
import java.io.ByteArrayOutputStream;
import java.io.IOException;

import com.sun.image.codec.jpeg.ImageFormatException;
import com.sun.image.codec.jpeg.JPEGCodec;
import com.sun.image.codec.jpeg.JPEGEncodeParam;
import com.sun.image.codec.jpeg.JPEGImageEncoder;

the underlined fail. What drives me insane is, that all of those  
classes reside in the java
version's classes.jar. So why the extra treatment for the com.sun.XY  
classes?

J.L.Simon


Re: Why does Maven supress com.sun.image.codec.jpeg?

Posted by Hilco Wijbenga <hi...@gmail.com>.
On Tue, Nov 18, 2008 at 03:59, Juergen Lorenz Simon <si...@webtecc.com> wrote:
:
<snip/>
:
> the underlined fail. What drives me insane is, that all of those classes
> reside in the java
> version's classes.jar. So why the extra treatment for the com.sun.XY
> classes?

I just tried a very simple program with all the imports you listed and
it all compiles fine. I do get warnings ("... is Sun proprietary API
and may be removed in a future release") but that is valid as we all
know you shouldn't use com.sun.* stuff (although you are free to
ignore those warnings, of course :-) ). So no compiler *errors* only
warnings.

I think something else is wrong.

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why does Maven supress com.sun.image.codec.jpeg?

Posted by Juergen Lorenz Simon <si...@webtecc.com>.
Hi,
thanks for the replies. I checked the command



On 19.11.2008, at 08:43, "Geoffrey Wiseman"  
<ge...@gmail.com> wrote:

> On Tue, Nov 18, 2008 at 6:59 AM, Juergen Lorenz Simon <simon@webtecc.com 
> >wrote:
>
>> the underlined fail. What drives me insane is, that all of those  
>> classes
>> reside in the java
>> version's classes.jar. So why the extra treatment for the com.sun.XY
>> classes?
>>
>
> Fail in the Maven command-line, or somewhere else?
> Using Maven, Eclipse and m2eclipse, i've seen that happen and can  
> talk about
> it, but if you're experiencing it at the Maven command-line  
> compilation,
> then it's something different.
>
>  - Geoffrey
> -- 
> Geoffrey Wiseman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why does Maven supress com.sun.image.codec.jpeg?

Posted by Geoffrey Wiseman <ge...@gmail.com>.
On Wed, Nov 19, 2008 at 4:52 AM, Juergen Lorenz Simon <si...@webtecc.com>wrote:

> Hi,
> thanks for the replies. I checked the command line and it worked out
> alright. So I went back to Eclipse and tried more things. After removing the
> JRE library and re-adding it, the problem vanished. I'm confused...
>
> Thanks :-)


I haven't looked into it in great detail, but when a project is configured,
it can have a JRE system library or an 'Execution Environment' system
library.  The latter comes with a lot of exclusions to remove the hidden
elements.
Beyond that, I can't tell you much - except that somehow you ended up with
the execution environment system library.  I did read a little about these
but I've forgotten what I read, so I'll let you research them for yourself
if you're interested.

-- 
Geoffrey Wiseman

Re: Why does Maven supress com.sun.image.codec.jpeg?

Posted by Juergen Lorenz Simon <si...@webtecc.com>.
Hi,
thanks for the replies. I checked the command line and it worked out  
alright. So I went back to Eclipse and tried more things. After  
removing the JRE library and re-adding it, the problem vanished. I'm  
confused...

Thanks :-)

On 19.11.2008, at 08:43, "Geoffrey Wiseman"  
<ge...@gmail.com> wrote:

> On Tue, Nov 18, 2008 at 6:59 AM, Juergen Lorenz Simon <simon@webtecc.com 
> >wrote:
>
>> the underlined fail. What drives me insane is, that all of those  
>> classes
>> reside in the java
>> version's classes.jar. So why the extra treatment for the com.sun.XY
>> classes?
>>
>
> Fail in the Maven command-line, or somewhere else?
> Using Maven, Eclipse and m2eclipse, i've seen that happen and can  
> talk about
> it, but if you're experiencing it at the Maven command-line  
> compilation,
> then it's something different.
>
>  - Geoffrey
> -- 
> Geoffrey Wiseman

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: Why does Maven supress com.sun.image.codec.jpeg?

Posted by Geoffrey Wiseman <ge...@gmail.com>.
On Tue, Nov 18, 2008 at 6:59 AM, Juergen Lorenz Simon <si...@webtecc.com>wrote:

> the underlined fail. What drives me insane is, that all of those classes
> reside in the java
> version's classes.jar. So why the extra treatment for the com.sun.XY
> classes?
>

Fail in the Maven command-line, or somewhere else?
Using Maven, Eclipse and m2eclipse, i've seen that happen and can talk about
it, but if you're experiencing it at the Maven command-line compilation,
then it's something different.

  - Geoffrey
-- 
Geoffrey Wiseman