public class NewClass1 {
public static void main(String[] args) throws FileNotFoundException {
String datasetFile = args[0];
BufferedReader in = new BufferedReader(new FileReader(datasetFile));
}
}
次のエラーが発生しました
Exception in thread "main" java.io.FileNotFoundException: abc (The system cannot find the file specified)
at java.io.FileInputStream.open(Native Method)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileInputStream.<init>(FileInputStream.java:97)
at java.io.FileReader.<init>(FileReader.java:58)
at JavaApplication.NewClass1.main(NewClass1.java:29)
このコードに置き換える必要がありますか?
BufferedReader out = new BufferedReader(new
InputStreamReader(System.in));
String input = out.readLine();