Skip to main content

JAI-API DisplayHistogramApp- Error

2 replies [Last post]
jjt
Offline
Joined: 2009-09-01
Points: 0

I am newbee to JAI-API

Using WindowsXp and JDK1.6 or above

I have download the samples DisplayHistogram.java and DisplayHistogramApp.java
Compile and Execute with Jcreator 4.5

While i execute the DisplayHistogramApp.java the following errors:

Exception in thread "main" java.lang.ArrayIndexOutOfBoundsException: 0
at DisplayHistogramApp.main(DisplayHistogramApp.java:51)

Line 51: public static void main(String[] args)
{
PlanarImage image = JAI.create("fileload", args[0]);
ParameterBlock pb = new ParameterBlock();

I would not identify the JAI-API.
Can anyone guide me on this....
Thanks in Advance

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
cafeanimal
Offline
Joined: 2008-04-29
Points: 0

Hello,

It looks like you might have run the app without giving it a command line argument for the image file to process.

Hope this helps,

Michael

jjt
Offline
Joined: 2009-09-01
Points: 0

Yes. I made it!

I have used Jcreator options to prompt the argument then locate the file, it produce the histogram

Thanks