Results 1 to 4 of 4
  1. #1
    mew
    mew is offline Member
    Join Date
    Nov 2007
    Posts
    70
    Rep Power
    0

    Default Unresolved compilation problem

    I have a tricky problem. I have spent some time but don't have any clue.

    Java Code:
    BufferedReader in = new BufferedReader(new FileReader("C:\grades.txt"));
    I want to read a file named grades.txt which is on C drive.

    Please help.

  2. #2
    Krmeus is offline Member
    Join Date
    Dec 2007
    Posts
    3
    Rep Power
    0

    Default

    Do you get any errors when you try and run this?

  3. #3
    staykovmarin is offline Senior Member
    Join Date
    Nov 2007
    Location
    Newport, WA
    Posts
    141
    Rep Power
    0

    Default

    You need escape your file path declaration with a blackslash:
    Java Code:
    BufferedReader in = new BufferedReader(new FileReader("C:\\grades.txt"));
    Also posting the error helps people find your problem faster.

  4. #4
    mew
    mew is offline Member
    Join Date
    Nov 2007
    Posts
    70
    Rep Power
    0

Similar Threads

  1. Unresolved compilation problem
    By mew in forum New To Java
    Replies: 2
    Last Post: 12-30-2007, 08:17 PM
  2. compilation error with Jcreator
    By Heather in forum JCreator
    Replies: 2
    Last Post: 06-30-2007, 05:12 PM
  3. compilation issue
    By orchid in forum Eclipse
    Replies: 2
    Last Post: 04-20-2007, 01:51 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •