Question: I keep getting a file not found error for reading the file, I have put it into the class directory and added it to the class path, while still getting this error. I have done both the file name and absolute file path but still it still can't find the file. My code is:

```
File i = new File ("C:\\Users\\Oakley\\Desktop\\Android\\Workspace\\Testing\\assets\\Games.txt");
Scanner is = new Scanner(file);
String a = is.next();
is.close();

```

How can I fix this problem?

Answer: 
> 
> any ideas or recomendations 
> 
> 
> 

An Android device does not have a `C:` drive. Your path (`C:\Users\Oakley\Desktop\Android\Workspace\Testing\assets\Games.txt"`) is not a path to a file on your Android device.

If `Testing/` is your project directory, then to access assets, use `AssetManager`. You get an `AssetManager` by calling `getResources().getAssets()` on a `Context`, such as your `Activity`. You can then call `open("Games.txt")` on the `AssetManager` to get an `InputStream` that you can use with some parser.
I don't know Java that well, but maybe you just need to pass in the file object you defined earlier instead of the word "file" which you didn't define anywhere. Scanner is = new Scanner(i);