title: Cannot read json file in java
body: <p>I am using eclipse for reading a jsonfile. I put the jsonfile in my src->main->java->testjson->jsonfile.json . Now I am trying to read the jsonfile. But my progam cannot find the file. I get the output "nothing". Here is the code I already implement:</p>
  
  <pre><code>JsonParser parser = new JSONParser();
  try{
  
  Object obj = parser.parse(new FileReader("jsonfile.json"));
  JSONObject jsonObject = (JSONObject) obj;
  String name = (String) jsonObject.get("name");
  
  }
  
  catch(Exception e){
  System.out.println("nothing");
  }
  </code></pre>