java - 重复的类 [英] java - duplicate class
本文介绍了java - 重复的类的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
对于为什么我为以下代码出现重复类错误感到困惑?
Confused as to why I get duplicate class error for the following code?
/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package database_console;
import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.SQLException;
/**
*
* @author davidsonr
*/
public class DBConnect {
/**
* @param args the command line arguments
*/
public static void main(String[] args) {
// TODO code application logic here
}
}
Netbeans将DBConnect强调为红色,并出现重复的类错误。
Netbeans highlights DBConnect as red with duplicate class error.
推荐答案
这是netbeans的一个已知问题 BUG 226360
This is a known issue with netbeans BUG 226360
它可能有助于清除Netbeans缓存:
it might help to clear Netbeans cache:
转到帮助
- > 关于
,您将会请参阅
Go to Help
-> About
and you will see
缓存目录: Path \to \Directory
Cache directory: Path\to\Directory
关闭NetBeans ,转到指定目录并删除所有内容。
Close NetBeans, go to specified directory and delete everything.
这篇关于java - 重复的类的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文