Hi All,
I am now trying to fill a Table with data from a text file in my local filesystem.
public void init() {
initLayout();
// final FileResource stream = new FileResource(new File("input/hierarchy-query.txt"), ConceptApplication.getInstance());
try {
String contentString = FileUtils.readFileToString(new File("/input/hierarchy-query.txt"));
System.out.println(contentString);
} catch (IOException e) {
e.printStackTrace();
}
System.out.println("contentString");
}
See where I put the file in the directory.
directory
I kept getting errors like:
java.io.FileNotFoundException: input\hierarchy-query.txt (The system cannot find the path specified)
Where should I put this file? In general, how to access file in local filesystem using Vaadin?