Results 1 to 3 of 3

Thread: file path

  1. #1
    ras_pari is offline Member
    Join Date
    Oct 2009
    Posts
    40
    Rep Power
    0

    Question file path

    Hi all..
    I want to know where to store my file that I have ro read from java program..
    I am working on a Apache tomcat.......I am working on java beans..I have store text file in classes folder of webinf and also in jsp folder of examples..
    but that is giving error which is follwing:

    java.io.FileNotFoundException: prob.txt (The system cannot find the file specified)

  2. #2
    Eranga's Avatar
    Eranga is offline Moderator
    Join Date
    Jul 2007
    Location
    Colombo, Sri Lanka
    Posts
    11,371
    Blog Entries
    1
    Rep Power
    20

    Default

    When you execute the application get the file path and check that file is available in that location? Your error says that looking a file which is not found in the file path you are dealing with.

    Can you show your code segment here that how you work on with the path of the file.

  3. #3
    ras_pari is offline Member
    Join Date
    Oct 2009
    Posts
    40
    Rep Power
    0

    Default

    I have keep the file to be read in a folder name java1 which is in c drive and given a path like this :
    File inputDataFile = new File("\pa_rashi\Desktop\prob.txt");
    My program is working....
    but anybody can tell me the what is path when file is in desktop...

Similar Threads

  1. reading file from a path
    By new_coder in forum New To Java
    Replies: 5
    Last Post: 08-17-2009, 05:52 AM
  2. Path for properties file and license
    By aleks.farrier in forum Advanced Java
    Replies: 0
    Last Post: 08-03-2009, 04:12 PM
  3. find file with * on the path
    By itaipee in forum New To Java
    Replies: 7
    Last Post: 07-08-2009, 09:05 AM
  4. How to set Image file path
    By anil.bharadia in forum AWT / Swing
    Replies: 1
    Last Post: 01-28-2009, 10:10 PM
  5. file path
    By Arsench in forum New To Java
    Replies: 7
    Last Post: 10-30-2008, 06:39 AM

Tags for this Thread

Posting Permissions

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