Search:

Type: Posts; User: Norm

Search: Search took 0.17 seconds.

  1. Replies
    11
    Views
    1,869

    Re: File not found exception

    Put all the calls to constructors and methods that can throw an exception. The compiler will give you an error message if you don't put a statement inside that should be inside.
    The simplest way...
  2. Replies
    11
    Views
    1,869

    Re: File not found exception

    Did you try moving the }catch( ... to the end of the code that uses the file IO classes?
  3. Replies
    11
    Views
    1,869

    Re: File not found exception

    Move the definition of the variables OUTSIDE of the {} in the try{}catch block.
    Assign them values inside the {}s.

    Or move the catch() below the last place the variables are used.
  4. Replies
    11
    Views
    1,869

    Re: File not found exception

    Take a look at the tutorial:
    Catching and Handling Exceptions (The Java™ Tutorials > Essential Classes > Exceptions)
  5. Replies
    11
    Views
    1,869

    Re: File not found exception

    You need to put those lines of code inside of a try{}catch() block for the exception that can be thrown by the code on the line numbers given in the error messages.
    Be sure to add a call to the...
  6. Replies
    11
    Views
    1,869

    Re: File not found exception

    Please copy the full text of the error message and paste it here. It has important info about the error.
Results 1 to 6 of 6