Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我使用的是 Java 7,NIO包而不是IO,但 JFileChooser 使用File类 to getSelectedFile(),但在 NIO 中只有Path类。我如何使用NIO类JFileChooser?
NIO
IO
File
getSelectedFile()
Path
JFileChooser
yourPath = yourJFileChooser.getSelectedFile().toPath();
Path path = selectedFile.toPath();
试试这个 :
File file = Paths.get(URI).toFile();