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

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Ion Tichy
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

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Hilco Wijbenga-3
On Tue, Nov 18, 2008 at 03:59, Juergen Lorenz Simon <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Geoffrey Wiseman
In reply to this post by Ion Tichy
On Tue, Nov 18, 2008 at 6:59 AM, Juergen Lorenz Simon <[hidden email]>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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Ion Tichy
Hi,
thanks for the replies. I checked the command



On 19.11.2008, at 08:43, "Geoffrey Wiseman"  
<[hidden email]> wrote:

> On Tue, Nov 18, 2008 at 6:59 AM, Juergen Lorenz Simon <[hidden email]
> >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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Ion Tichy
In reply to this post by Geoffrey Wiseman
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"  
<[hidden email]> wrote:

> On Tue, Nov 18, 2008 at 6:59 AM, Juergen Lorenz Simon <[hidden email]
> >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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

Geoffrey Wiseman
On Wed, Nov 19, 2008 at 4:52 AM, Juergen Lorenz Simon <[hidden email]>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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

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

nishaneenu27
This post has NOT been accepted by the mailing list yet.
In reply to this post by Ion Tichy
Yes removing and adding JRE liberary again helped me too.

Thanks
Nisha
Loading...