Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Using Exceptions defined in a separate .java file

807599Apr 3 2007 — edited Apr 3 2007
Hello,

I'm new to using exceptions.

I am trying to write a program which throws exceptions defined in a separate .java file. When I try to throw the custom-defined exception, I keep getting the error msg "Package exceptioname does not exist".

I think I'm supposed to write a few lines of code to "link" my main files and the exception files together.

Can somebody please advise how I should go abt doing that?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 1 2007
Added on Apr 3 2007
8 comments
329 views