【发布时间】:2013-12-30 06:00:13
【问题描述】:
我正在使用 Eclipse。当我使用 JFileChooser 时,消息fatal: Not a git repository (or any of the parent directories): .git 不断出现在控制台中。每当我导航到新文件夹时,都会再次打印相同的消息。我还注意到,如果我导航到一个 git 存储库的文件夹,控制台会打印目录路径而不是错误消息。
这是我使用的代码:
import javax.swing.JFileChooser;
public class JFileChooserTest
{
public static void main (String[] args)
{
JFileChooser test = new JFileChooser ();
test.showOpenDialog (null);
}
}
我尝试在Doctor Java中运行上面的代码,没有出现错误信息,所以我认为问题与Eclipse有关。
为什么会这样?有没有办法关闭这些消息?
【问题讨论】:
标签: java eclipse swing git jfilechooser