Thanks, Kendall.

I did try Xvfb yesterday.  I found a version of Xvfb that seems to
work well on SPARC Solaris, from
http://puck.informatik.med.uni-giessen.de/download/GISWxwplt-sparc.tar.gz.

However, when I try to use JPEGImageEncoder.encode(), I get

        java.lang.NoClassDefFoundError (which class?) or
        java.lang.RuntimeException: Unable to process image stream, incorrect
format.

I do not get these errors when running under a real X server.  Any ideas?
The two different stack traces follow.  Joe

>>>>>>>> NoClassDefFoundError <<<<<<<<
java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError
        at java.lang.Class.forName0(Native Method)
        at java.lang.Class.forName(Class.java:120)
        at
java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment(GraphicsEnvironment
.java:58)
        at
java.awt.image.BufferedImage.createGraphics(BufferedImage.java:1011)
        at
com.sun.media.jai.codecimpl.JPEGImage.<init>(JPEGImageDecoder.java:95)
        at
com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedImage(JPEGImage
Decoder.java:49)
        at
com.sun.media.jai.opimage.CodecRIFUtil.create(CodecRIFUtil.java:67)
        at com.sun.media.jai.opimage.JPEGRIF.create(JPEGRIF.java:52)
        at java.lang.reflect.Method.invoke(Native Method)
        at javax.media.jai.FactoryCache.invoke(FactoryCache.java:128)
        at
javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1651)
        at
javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperatio
nRegistry.java:479)
        at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:338)
        at com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:103)
        at java.lang.reflect.Method.invoke(Native Method)
        at javax.media.jai.FactoryCache.invoke(FactoryCache.java:128)
        at
javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1651)
        at
javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperatio
nRegistry.java:479)
        at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:338)
        at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:779)
        at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:825)
        at javax.media.jai.RenderedOp.getSampleModel(RenderedOp.java:2052)
        at
com.sun.media.jai.codecimpl.JPEGImageEncoder.encode(JPEGImageEncoder.java:13
7)

>>>>>>>> Unable to process image stream<<<<<<<<
java.lang.reflect.InvocationTargetException: java.lang.RuntimeException:
Unable to process image stream, incorrect format.
        at
com.sun.media.jai.codecimpl.JPEGImage.<init>(JPEGImageDecoder.java:69)
        at
com.sun.media.jai.codecimpl.JPEGImageDecoder.decodeAsRenderedImage(JPEGImage
Decoder.java:49)
        at
com.sun.media.jai.codec.ImageDecoderImpl.decodeAsRenderedImage(ImageDecoderI
mpl.java:148)
        at com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:118)
        at java.lang.reflect.Method.invoke(Native Method)
        at javax.media.jai.FactoryCache.invoke(FactoryCache.java:128)
        at
javax.media.jai.OperationRegistry.invokeFactory(OperationRegistry.java:1651)
        at
javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(ThreadSafeOperatio
nRegistry.java:479)
        at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:338)
        at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:779)
        at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:825)
        at javax.media.jai.RenderedOp.getSampleModel(RenderedOp.java:2052)
        at
com.sun.media.jai.codecimpl.JPEGImageEncoder.encode(JPEGImageEncoder.java:13
7)

> -----Original Message-----
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Wednesday, January 31, 2001 9:19 AM
> To: Joe Latone; [EMAIL PROTECTED]
> Subject: RE: [JAVA2D] X server dependency and consequences of using a
> remo te X server
>
> I'm not absolutely sure if you'd suffer a performance penalty by using a
> remote X-server, but would think that would be the case...  After all,
> the
> whole reason you need a frame buffer at all is that some of the graphics
> calls use native libraries to do the work.
>
> What you can do is use a program called XVFB to create a "Virtual Frame
> Buffer".  The best article I've seen about it (along with links for
> obtaining XVFB) is at:
>
> http://www.sunworld.com/sunworldonline/swol-03-2000/swol-03-xvfb.html
>
> I've used a server side Java app that did some image manipulation
> (though
> not with JAI or Java2D) and it worked well for me.  It's also nice
> because
> you can completely control the characteristics of the frame buffer you
> set
> up - 32 bit color, screen resolution, etc.
>
> ---> Kendall Gelner ([EMAIL PROTECTED])
>

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JAVA2D-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to