0

I have the following example

package.one-which contains Map.java and a maps.package containing map0.map

How do I call map0.map<--A text file from maps?

I have tried various different formats.

   //HardCoded mapname varient
   FileReader theFile = new FileReader("c:\\temp\\map0.map");
   //From c: temp
    //FileReader theFile = new FileReader("c:\\temp\\"+mapName);

this problem line-->FileReader theFile = new FileReader("maps\\"+mapName);

I have tried /maps/+mapName however it does not work mapName is passed into the function and will be dynamic.

How do I call map0.map<--A text file from maps?

Data
  • 113
  • 2
  • 11
  • I cant explain it well Iam not alowed images and text formating does not work as spaces are removed and everything does not line up. – Data May 15 '17 at 22:22
  • Please refer to [this post](http://stackoverflow.com/questions/6845231/how-to-correctly-get-image-from-resources-folder-in-netbeans) to know where to put your resource file and how to read it. – TuyenNTA May 15 '17 at 22:27
  • `Paths.get("maps/package/map0.map")` should work fine from netbeans. – assylias May 15 '17 at 22:30

0 Answers0