I have Java JDK 1.7.0_07 installed and I made sure that the Java build path in Eclipse is pointing to the right directory in my system. How come my machine complains of not having the 'File' object available? I have made sure i imported java.io.*. What could be wrong?
Asked
Active
Viewed 1.1k times
8
-
Does it know what Object or String are? And java.io is a package, not a library. – Dan D. Sep 01 '12 at 10:28
-
would please provide your import code – Mohammod Hossain Sep 01 '12 at 10:31
-
Okay, nvm I figured out the problem and it's quite stupid. I'm a newbie to this and thank you for your help. – tomato Sep 01 '12 at 10:32
1 Answers
16
Just make sure the JRE System Library is part of your build path (see the picture below). Check that the System library is set and if not, click on Add library and select JRE System Library.

aymeric
- 3,877
- 2
- 28
- 42