FileSystemView.getShellFolder: f=D:\

Hello all,

I am getting following runtime exception when I execute the application on JDK 1.4.2_13. But run successfully on JDK 5. If you have any solution or idea please tell me.

File[] roots = File.listRoots();

String deviceType=FileSystemView.getFileSystemView().

getSystemTypeDescription(roots);

Exception as follows :

FileSystemView.getShellFolder: f=D:\

java.io.FileNotFoundException: File D:\ not found

at sun.awt.shell.Win32ShellFolderManager2.createShellFolder(Win32ShellFolderManager2.java:48)

at sun.awt.shell.Win32ShellFolderManager2.createShellFolder(Win32ShellFolderManager2.java:36)

at sun.awt.shell.ShellFolder.getShellFolder(ShellFolder.java:236)

at javax.swing.filechooser.FileSystemView.getShellFolder(FileSystemView.java:486)

at javax.swing.filechooser.WindowsFileSystemView.getSystemTypeDescription(FileSystemView.java:639)

at IsDevice.scanForDevice(IsDevice.java:16)

Here D:\ is my CD Drive.

Regards

Nikhil

[1041 byte] By [nikhil_shravanea] at [2007-11-26 16:40:42]
# 1
No CD inside?
CeciNEstPasUnProgrammeura at 2007-7-8 23:07:38 > top of Java-index,Java Essentials,Java Programming...
# 2

If CD is there It works. But If it is not there it gives the exception. It returns null when it doesnt get the native information of CD Drive.But how can it be handled? Is it bug in 1.4? 1.5 sorted out this problem.

Regards

Nikhil

I have just tested with CD. Sorry for delay.

Message was edited by:

nikhil_shravane

nikhil_shravanea at 2007-7-8 23:07:38 > top of Java-index,Java Essentials,Java Programming...
# 3
http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=4607161
CeciNEstPasUnProgrammeura at 2007-7-8 23:07:38 > top of Java-index,Java Essentials,Java Programming...
# 4
OK thanks a lot! I ll get back here.
nikhil_shravanea at 2007-7-8 23:07:38 > top of Java-index,Java Essentials,Java Programming...