ファイル IO を netbeans 内で動作させることができないようです
public static void main(String[] args) throws IOException
{
System.out.println("File Location: "+ System.getProperty("myFile.txt"));
//File file = new File("myFile.txt");
}
これには例外があります。
Exception in thread "main" java.lang.NullPointerException
そして出力:
File Location: null
なしでSystem.getProperty
、私はFileNotFoundException
java.io.FileNotFoundException: myFile.txt (The system cannot find the file specified)
ファイル自体はプロジェクトのソース ディレクトリにあり、IDE の [ソース パッケージ] > [myproject] > [myFile.txt] の下にも表示されます。
ファイルや提案が見つからない理由はありますか?
ありがとう