I have the following code to read from a JSON file :
public static void main (String[] args){
JSONParser parser = new JSONParser();
System.out.println("Reading JSON file ...");
FileReader fileReader = new FileReader("data.json");
JSONObject json = (JSONObject) parser.parse(fileReader);
String timestamp = (String) json.get("time");
String traces = (String) json.get("traces");
}
JSON file is in the class directory. I am getting FileNotFoundException
What am I doing wrong?