?
Solved

JBuilder 7 error:  catch

Posted on 2003-02-26
2
Medium Priority
?
168 Views
Last Modified: 2010-03-31
I am getting this error in my code for catch;


try
    {
      SAXParserFactory spf =SAXParserFactory.newInstance
     ();
      SAXParser parser = spf.newSAXParser();
      XMLReader r = parser.getXMLReader();
    }
 catch(IOException e) {
      e.printStackTrace();
    }

Error:
The exception can never be thrown in the corresponding try block.
0
Comment
Question by:kaushalshah
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 3

Accepted Solution

by:
NetWize earned 200 total points
ID: 8023861
Quick and dirty: Change from IOException to Exception and at least the compile will do...
0
 

Author Comment

by:kaushalshah
ID: 8027864
Thanks NetWize, it worked.   I'm new to Java.

Thanks
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION Working with files is a moderately common task in Java.  For most projects hard coding the file names, using parameters in configuration files, or using command-line arguments is sufficient.   However, when your application has vi…
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers will learn about if statements in Java and their use The if statement: The condition required to create an if statement: Variations of if statements: An example using if statements:
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
Suggested Courses
Course of the Month9 days, 11 hours left to enroll

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question