我已经读过这个帖子,因为它说我必须有public static void main(java.lang.String[] args)
我的主要功能是这样的:
public static void main(String[] args) throws FileNotFoundException, IOException, TrieException, TSException {
CSVReader reader=new CSVReader(new FileReader(".//Data//test1.csv"));
String[] nextline;
int linenumber=0;
double[] numbers=new double[10];
double[] times=new double[10];
for(int i=0;i<=7;i++)
{
nextline = reader.readNext();
numbers[i]= Double.parseDouble(nextline[0]);
times[i]=i;
}
DiscordsAndMotifs dr= edu.hawaii.jmotif.sax.SAXFactory.series2DiscordsAndMotifs(numbers, 4, 2, 2, 2,null);// If I comment this line of code, my programm works without any error
}
Run Code Online (Sandbox Code Playgroud)
如果我运行我的程序,我会收到此错误:
Exception in thread "main" java.lang.NoSuchMethodError: org.hackystat.utilities.logger.HackystatLogger.getLogger(Ljava/lang/String;Ljava/lang/String;) Ljava/util/logging/Logger;
at edu.hawaii.jmotif.sax.SAXFactory.<clinit>(SAXFactory.java:51)
at motif.discovery.MotifDiscovery.main(MotifDiscovery.java:35)`
Run Code Online (Sandbox Code Playgroud)
我的项目中需要库.这个错误的原因是什么?你能帮我解决这个问题吗?
这听起来像你正在使用的hackystat实用程序的版本与jmotif构建的版本不同 - 所以jmotif jar文件包含对执行时不存在的方法的引用.
我建议你找出jmotif库需要哪个版本的hackystat-utilities,并使用它.