java - NullPointerException when showing JFileChooser -
I show a JFileChooser with this snippet: Usually, for the first time shown, it displays & amp; The work correctly the second time, it will always throw this exception: Java Version: and I found the thread of what I need to downgrade Java version should I follow their advice, or do anything that could be wrong Security was?
public file getDestination () {JFileChooser Selector = new JFileChooser (); Chooser.setFileSelectionMode (JFileChooser.DIRECTORIES_ONLY); Int option = chooser.showSaveDialog (faucet); If (option == JFileChooser.APPROVE_OPTION) {return chooser.getSelectedFile (). GetAbsolutePath (); } Return new file ("."); }
formula exception "original L & amp; F file loading thread" sun.awt.shell.Win32ShellFolder2 SunkawtkshellkWin32ShellFolderManager2kisFileSystemRoot (unknown source sun.awt.shell.ShellFolder.isFileSystemRoot on JavaklangkNullPointerException (unknown javax.swing.filechooser on .pidlsEqual) sun.awt.shell on (unknown source). Source on Win32ShellFolder2.equals (unknown source) Javax.swing.filechooser.WindowsFileSystemView.istrraversable on FileSystemView.isFileSystemRoot (unknown source) javax.swing.JFileChooser.istrraversable (unknown source) javax.swing.plaf.basic.basicDirectoryModel At $ LoadFilesThread.run0 (unknown javax.swing.plaf.basic.BasicDirectoryModel $ LoadFilesThread.run (Unknown Source source)) adds
Comments
Post a Comment