File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Exception errror in a program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "Exception errror in a program" Watch "Exception errror in a program" New topic
Author

Exception errror in a program

aman goyal
Greenhorn

Joined: Nov 29, 2009
Posts: 5
This is the program:-


I am getting this error:-
Caught exception java.lang.ArrayIndexOutOfBoundsException: 0
Please help me to rectify the error
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

Next time UseCodeTags. I have added them for you.


[My Blog]
All roads lead to JavaRanch
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

I am getting this error:-
Caught exception java.lang.ArrayIndexOutOfBoundsException: 0


Posting the full stack trace would help a lot. It contains the exact line where the exception was raised.
Evan Caballero
Ranch Hand

Joined: Dec 10, 2009
Posts: 59
perhaps there is a mistakes here : fis = new FileInputStream(args[0]);

If you do not pass any arguments to your program, the args array will be of length 0, so there won't be any element à index 0.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception errror in a program
 
Similar Threads
Playing with KeyPair
Product ID
Help with writing to a file!
Algorithm DES not available