aspose file tools*
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes Exception program error Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "Exception program error" Watch "Exception program error" New topic
Author

Exception program error

Shiva Mohan
Ranch Hand

Joined: Jan 05, 2006
Posts: 479




cannot resolve symbol error at line 1.but IOException subclass's are throwed here is accepted.right?Please help.
Anton Uwe
Ranch Hand

Joined: Jan 10, 2007
Posts: 122
The code will compile if you insert the import for the FileNotFoundException.

import java.io.FileNotFoundException;

Since you declared main throwing IOException, any subclass of IOException will be "accepted" (but being "thrown" by main then).
[ January 12, 2007: Message edited by: Anton Uwe ]
Keith Lynn
Ranch Hand

Joined: Feb 07, 2005
Posts: 2367
Originally posted by Shiva Mohan:


cannot resolve symbol error at line 1.but IOException subclass's are throwed here is accepted.right?Please help.


The problem is that the compiler doesn't know what a FileNotFoundException is. When you import a class, then you only get that class and not its subclasses.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Exception program error