Problem with relative file path

后端 未结 6 1907
旧时难觅i
旧时难觅i 2021-01-01 22:31

So here is my program, which works ok:

import java.io.FileReader;
import java.io.BufferedReader;
import java.io.IOException;
import java.util.Scanner;
import         


        
6条回答
  •  悲&欢浪女
    2021-01-01 23:24

    If aioobe@'s suggestion doesn't work for you, and you need to find out which directory the app is running from, try logging the following:

    new File(".").getAbsolutePath()
    

提交回复
热议问题