我正在使用Eclipse,并且有一段时间没有使用Java了。但是,我可以在命令行上编译我的代码,并生成必要的.class
文件。在Eclipse中,它抱怨The declared package "Devices" does not match the expected package ""
。这是什么意思,我该如何解决?
样例代码:
package Devices;
public final class DevFrequency
{
public short messageID;
public double frequency;
public short converterID;
public DevFrequency()
{
}
public DevFrequency(short _messageID,double _frequency,short _converterID)
{
messageID = _messageID;
frequency = _frequency;
converterID = _converterID;
}
}
我的项目的名称是DeviceDDS
。
/src/Converters
目录中吗?