473,320 Members | 2,048 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

JAVA - file not found exception

I am trying to read a file with
Expand|Select|Wrap|Line Numbers
  1. FileInputStream fstream = new FileInputStream("file1.txt");
I have placed the file exactly in the folder where the CLASS File s there. still i get an error saying "The system cannot find the file specified"

Any suggestions?
Apr 28 '12 #1
2 2272
the file must be placed in "user.dir" folder.
if you are running in eclipse then its proj home dir.
May 12 '12 #2
you should give it the project dir and file name
Jun 2 '12 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: manika | last post by:
Hi, I am trying to upload a file and then copy it to a different destination. I use File.Copy.For some files I get "File not found" exception when I try to use the File.copy utility while others...
6
by: chanmm | last post by:
Dear all, I have run the same web application in my Windows XP Pro without any problem but once I deploy it in Windows 2003 Server the message below appear: The system cannot find the file...
0
by: Dithos | last post by:
Hi all, I hope somebody will be able to help me here and i am in a predicament as to how to solve this problem.i have been trying it since a week. i have 3 projects, say A, B and C. A is a...
3
by: gomzi | last post by:
hi, When I try to upload something using the fileupload control that comes with .NET I keep getting a file not found exception. This below piece of code throws up this error....
5
by: rahana | last post by:
Hello , Presently for compiling a simple java prog i am placing my .java file in C:---->j2sdk1.4---->bin----->rahana----->my .java progs. but my friend was suggesting not to keep...
3
by: Nick048 | last post by:
Hi to All, In order to create a Date Picker that I need to use in Oracle forms, I have modified some element in the source of original calendarPJC provided from Oracle. Following the...
4
by: vasavimaruthi | last post by:
hi, i got class not found exception of a small jdbc program in windows. the program is like this import java.sql.*; public class Db1 { public static void main(String a)...
2
by: jpr | last post by:
I have 2 classes saved as 2 different java files.(eg- class ABC.java & PQR.java) ->ABC.java classABC extends JTextField { ABC(int i) { super(i); ...
4
by: yogarajan | last post by:
The specified module could not be found. (Exception from HRESULT: 0x8007007E) Description: An unhandled exception occurred during the execution of the current web request. Please review the stack...
1
by: bsonline | last post by:
I have to modify a .java file in a project. But I dont have any editor to compile java. I use putty to connect server(Solaris). And using putty console I modify .java file and save it. Then I down...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.