java JFileChooser问题

vista home basic 操作系统

MyEclipse 5

一个Swing 程序需要用到JFileChooser

一开始没啥问题 后来出现 异常

public class DirectoryChoose extends JFileChooser {

	public DirectoryChoose(Component parent,String title) {
		super(System.getProperty("user.dir"));
		setFileSelectionMode(DIRECTORIES_ONLY );
		setDialogTitle(title);
		showOpenDialog(parent);
	}
}


运行到 super(System.getProperty("user.dir"));
就出错了
Exception occurred during event dispatching:
java.lang.RuntimeException: java.io.IOException: Could not get shell folder ID list
	at sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Win32ShellFolderManager2.java:506)
	at sun.awt.shell.Win32ShellFolder2.getFileSystemPath(Win32ShellFolder2.java:563)
	at sun.awt.shell.Win32ShellFolderManager2.getPersonal(Win32ShellFolderManager2.java:137)
	at sun.awt.shell.Win32ShellFolder2$10.call(Win32ShellFolder2.java:658)
	at sun.awt.shell.Win32ShellFolder2$10.call(Win32ShellFolder2.java:645)
	at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
	at java.util.concurrent.FutureTask.run(FutureTask.java:138)
	at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
	at sun.awt.shell.Win32ShellFolderManager2$ComInvoker$3.run(Win32ShellFolderManager2.java:458)
	at java.lang.Thread.run(Thread.java:619)
Caused by: java.io.IOException: Could not get shell folder ID list
	at sun.awt.shell.Win32ShellFolder2.getFileSystemPath0(Native Method)
	at sun.awt.shell.Win32ShellFolder2.access$900(Win32ShellFolder2.java:55)
	at sun.awt.shell.Win32ShellFolder2$8.call(Win32ShellFolder2.java:565)
	at sun.awt.shell.Win32ShellFolder2$8.call(Win32ShellFolder2.java:563)
	at sun.awt.shell.Win32ShellFolderManager2$ComInvoker.invoke(Win32ShellFolderManager2.java:491)
	... 10 more





哪位 大牛 能解释下

你可能感兴趣的:(java,thread,MyEclipse,swing,sun)