Hi Nandita, Perhaps the JAI .dlls are not being found? Under Windows, in c:/j2sdk1.4.2_08/jre/bin, I have mlib_jai.dll checkmmx.exe mlib_jai_mmx.dll
What OS are you running under? What version of Java are you running? You could try some JAI test code and see if that works. http://archives.java.sun.com/cgi-bin/wa?A2=ind0403&L=jai-interest&F=&S=&P=1661 says: > This should be able to be managed using the exception handling > capability added in JAI 1.1.2. For more information see the interface > ImagingListener and the class ImagingException in the > javax.media.jai.util package, as well as > javax.media.jai.JAI.KEY_IMAGING_LISTENER. Since this is more of a Java question than a Ptolemy question, we can take it offline, so email me your response. _Christopher -------- Hi Chirstopher, Thanks for looking into possible reasons for the exceptions. I don't get any exceptions when the vergil shows up the JAI actors now , as you sugges ted JAI implementation jars namely jai_core.jar & jai_codec.jar needed to b e placed it in the right JDK. Currently I have the class files for all JAI actors in ptolemy/actor/lib /jai & the implementation jars in the JDK folder.However, now when I run th e the actors/ other demos , I get the following exception: Error: IOException occurs when search for propriate codecs. Occurs in: com.sun.media.jai.codec.ImageCodec java.io.IOException: The handle is invalid at java.io.RandomAccessFile.seek(Native Method) at com.sun.media.jai.codec.FileCacheSeekableStream.readUntil(File CacheSe ekableStream.java:129) at com.sun.media.jai.codec.FileCacheSeekableStream.read(FileCache Seekabl eStream.java:266) at com.sun.media.jai.codec.SeekableStream.readFully(SeekableStrea m.java: 327) at com.sun.media.jai.codec.SeekableStream.readFully(SeekableStrea m.java: 306) at com.sun.media.jai.codec.ImageCodec.getDecoderNames(ImageCodec. java:27 4) at com.sun.media.jai.opimage.StreamRIF.create(StreamRIF.java:80) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccess orImpl. java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMeth odAcces sorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at javax.media.jai.FactoryCache.invoke(FactoryCache.java:130) at javax.media.jai.OperationRegistry.invokeFactory(OperationRegis try.jav a:1682) at javax.media.jai.ThreadSafeOperationRegistry.invokeFactory(Thre adSafeO perationRegistry.java:481) at javax.media.jai.registry.RIFRegistry.create(RIFRegistry.java:3 40) at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:830) at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:878 ) at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:899) at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:810) at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:878 ) at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:899) at ptolemy.actor.lib.jai.JAIImageToken.asAWTImage(JAIImageToken.j ava:95) at ptolemy.actor.lib.image.ImageTableau.display(ImageTableau.java :197) at ptolemy.actor.lib.image.ImageTableau.append(ImageTableau.java: 139) at ptolemy.actor.gui.TokenEffigy.setTokens(TokenEffigy.java:218) at ptolemy.actor.lib.image.ImageDisplay._display(ImageDisplay.jav a:243) at ptolemy.actor.lib.image.ImageDisplay$2.run(ImageDisplay.java:2 09) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:2 09) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDis patchTh read.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispa tchThre ad.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.ja va:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.ja va:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) Exception in thread "AWT-EventQueue-0" java.lang.RuntimeException: - Unab le to render RenderedOp for this operation. at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:838) at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:878 ) at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:899) at javax.media.jai.RenderedOp.createInstance(RenderedOp.java:810) at javax.media.jai.RenderedOp.createRendering(RenderedOp.java:878 ) at javax.media.jai.RenderedOp.getRendering(RenderedOp.java:899) at ptolemy.actor.lib.jai.JAIImageToken.asAWTImage(JAIImageToken.j ava:95) at ptolemy.actor.lib.image.ImageTableau.display(ImageTableau.java :197) at ptolemy.actor.lib.image.ImageTableau.append(ImageTableau.java: 139) at ptolemy.actor.gui.TokenEffigy.setTokens(TokenEffigy.java:218) at ptolemy.actor.lib.image.ImageDisplay._display(ImageDisplay.jav a:243) at ptolemy.actor.lib.image.ImageDisplay$2.run(ImageDisplay.java:2 09) at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:2 09) at java.awt.EventQueue.dispatchEvent(EventQueue.java:461) at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDis patchTh read.java:242) at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispa tchThre ad.java:163) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.ja va:157) at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.ja va:149) at java.awt.EventDispatchThread.run(EventDispatchThread.java:110) I tried jpg,png,gif image files with the JAIImageReader, but similar exce ption Any ideas... Thanks for your help! nandita. Christopher Brooks <[EMAIL PROTECTED]> wrote: Hi there, I have a very basic question on importing the jar files for the JAI act ors. Currently I am able to make the class files in pttII/ptolemy/actor/ lib/ jai folder. And when I run vergil (it shows up JAI actors with exceptions).... basi cally I am unable to make ptolemy load the jai jar files during vergil. I placed the jar files in actor/lib. I refered to "Add an Actor" page & my actors do show up , but am faci ng t he jar issue, probably not doing something right... thanks, nandita. ------ Hi Nandita, I'm assuming your problem is with Ptolemy and vergil here, not with Kepler. $PTII/bin/vergil is a shell script that sets the classpath and invokes ptolemy.vergil.VergilApplication If you run "$PTII/bin/vergil -verbose" you will see the classpath that is used. The vergil script includes $PTII in the classpath, so the .class files in ptolemy/actor/lib/jai should be automatically included in the classpath and be visible to vergil. You need not construct a jar file containing the actors. Note that you would need to modify the configuration so that any new actors are visible. To do this, edit ptII/ptolemy/actor/lib/jai/jai.xml The way the configuration works is a tad complex, but briefly when you run the ptolemy.vergil.VergilApplication class, it uses the "full" configuration, which is found in ptolemy/configs/full/configuratoin.xml That file refers to ptolemy/configs/defaultFullConfiguration.xml, which includes image.xml: [input] image.xml includes jai.xml: [input] You say you are getting exceptions, what exceptions are you seeing? There is a separate issue with the JAI jar files from Sun. These jar files include the JAI implementation and under Windows for me are found in c:/j2sdk1.4.2_08/jre/lib/ext For me, the JAI implementation jar files found in that directory are mlibwrapper_jai.jar jai_core.jar jai_codec.jar I just want to be sure we are talking about the JAI actor jar files, not the JAI implementation jar files from Sun. If the JAI implementation jar files are not in the right place, then the JAI actors will not work. I've seen various problems here, most center around multiple JDKs and JREs are installed, and the JAI jar files are in one JDK or JRE, but not the right one. _Christopher --------------------------------------------------------------------------- - Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED] ---------------------------------------------------------------------------- Posted to the ptolemy-hackers mailing list. Please send administrative mail for this list to: [EMAIL PROTECTED]