我应该用什么替换sun.awt.shell.ShellFolder,这样我就不会收到编译警告? [英] With what should I replace sun.awt.shell.ShellFolder so I don't get compile warnings?
问题描述
我有一个使用 sun.awt.shell.ShellFolder.get( fileChooserComboBoxFolders);
的方法,我想替换该方法(或尽可能取消警告)。我可以用不属于Sun的任何东西替换它,以免在某些可能的删除操作时发出警告吗?
-
更新:不确定是否完全需要该代码。它使用的是旧版代码,因此我被要求删除所有编译警告。 ShellFolder的一个特点如下:
new线程{
public void run(){
ShellFolder.get( fileChooserComboBoxFolders);
}
} .start();
-
更新#2为什么需要它:JFileChooser仍然有点问题。 ),而不对他们做任何事情。这可能需要一段时间,因此可能会加快速度,因为较早的Java版本中JFileChooser的速度较慢。因此,删除。
I have a method using sun.awt.shell.ShellFolder.get("fileChooserComboBoxFolders");
which I want to replace (or suppress the warning if possible). Can I replace it with anything not Sun properietary so it doesn't throw warnings on some possible removals?
--
UPDATE: not sure if the code is needed at all. It's in a legacy code and I was asked to remove all compile warnings. The one particular with the ShellFolder goes the following:
new Thread {
public void run() {
ShellFolder.get("fileChooserComboBoxFolders");
}
}.start();
--
UPDATE #2 on why it was needed: JFileChooser is still a bit buggy.
AFAIK it fetches the file system root directories (Windows: drive letters) without doing anything with them. This may take a while, hence this might be a speed-up, for the slowness of JFileChooser in older java versions. So remove.
这篇关于我应该用什么替换sun.awt.shell.ShellFolder,这样我就不会收到编译警告?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!