reset password
Author Message
RandomAccess
Posts: 101
Posted 23:17 Sep 25, 2018 |

I'm using BufferedReader load = new BufferedReader(new FileReader("nameOfFile.txt")) to read the file, which works fine in eclipse, but doesn't translate to the jar file for some reason. Might anyone know why this is? I tried looking up other methods, but they didn't compile.

pgatsby
Posts: 10
Posted 00:46 Sep 26, 2018 |

It's probably the location of the file? for example like; C:\Users\User\Desktop\nameOfFile.txt 

RandomAccess
Posts: 101
Posted 11:16 Sep 26, 2018 |

The file is in the jar

dtang9
Posts: 52
Posted 23:26 Sep 26, 2018 |

Maybe you can try using scanner and file. You can ask the user to enter the file path?

RandomAccess
Posts: 101
Posted 02:18 Sep 27, 2018 |

Already tried that, sorry.