sorry for this dumb question. but i am really not able to find where i am doing wrong. please help. i am trying to parse a file using JSON. file is there in the system too. but it is showing filenotfound exception. and its really frustrating.
snippet of my code is below :
System.out.println("Please provide JSON file path : ");
filePathJson = "\"D:\\files\\test.xlsx\"";
//in.nextLine();
System.out.println("Please provide Excel file path : ");
filePathExcel = in.nextLine();
Object obj = parser.parse(new FileReader(filePathJson));
System.out.println("hii");
JSONArray array = new JSONArray();
and error I am getting :
Please provide JSON file path :
Please provide Excel file path :
"D:\\files\\test1.xlsx"
java.io.FileNotFoundException: "D:\files\test.xlsx" (The filename, directory name, or volume label syntax is incorrect)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:137)
at java.io.FileInputStream.<init>(FileInputStream.java:96)
at java.io.FileReader.<init>(FileReader.java:58)
at JavaJsonSplitter.main(JavaJsonSplitter.java:50)
Can somebody point me where i am doing wrong.
please ignore one useless sysout.