Windows temp directory details (Java)

后端 未结 7 2238
一生所求
一生所求 2020-12-20 15:12

I\'m writing a program that needs a generic temp folder. I\'m trying to find details about the Windows Temp folders. There are two paths that I know about -

7条回答
  •  再見小時候
    2020-12-20 15:50

    use this code

       try {    String s=File.createTempFile("temp-file", "tmp").getParent();
                System.out.println(s);
    
            } catch (IOException ex) {
                Logger. getLogger(Result.class.getName()).log(Level.SEVERE, null, ex);
                }
    

提交回复
热议问题