Leechael / ik-analyzer

Automatically exported from code.google.com/p/ik-analyzer
0 stars 0 forks source link

JDK1.5下报错,请问如何解决? #58

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
IKAnalyzer版本:IKAnalyzer2012_u5
JDK版本:1.5

java.lang.NoSuchMethodError: 
java.util.Arrays.binarySearch([Ljava/lang/Object;IILjava/lang/Object;)I
    at org.wltea.analyzer.dic.DictSegment.lookforSegment(DictSegment.java:229)
    at org.wltea.analyzer.dic.DictSegment.fillSegment(DictSegment.java:199)
    at org.wltea.analyzer.dic.DictSegment.fillSegment(DictSegment.java:170)
    at org.wltea.analyzer.dic.Dictionary.loadMainDict(Dictionary.java:209)
    at org.wltea.analyzer.dic.Dictionary.<init>(Dictionary.java:69)
    at org.wltea.analyzer.dic.Dictionary.initial(Dictionary.java:86)
    at org.wltea.analyzer.core.IKSegmenter.init(IKSegmenter.java:85)
    at org.wltea.analyzer.core.IKSegmenter.<init>(IKSegmenter.java:65)
    at org.wltea.analyzer.lucene.IKTokenizer.<init>(IKTokenizer.java:63)
    at org.wltea.analyzer.lucene.IKAnalyzer.tokenStream(IKAnalyzer.java:71)

Original issue reported on code.google.com by javacc...@gmail.com on 19 May 2012 at 7:12

GoogleCodeExporter commented 8 years ago
查了一下文档JDK1.5不支持Arrays.binarySearch(Object[], int, int, 
Object)方法,只在JDK1.6以上的版本才支持此方法的,希望可以�
��快修改一下,谢谢!

Original comment by javacc...@gmail.com on 19 May 2012 at 7:28

GoogleCodeExporter commented 8 years ago
请更新JDK版本,谢谢

Original comment by linliang...@gmail.com on 21 May 2012 at 9:47

GoogleCodeExporter commented 8 years ago
首先非常感谢您!现在90%的java库都兼容JDK1.5版本说明JDK1.5的�
��户量还是比较大的。就因为一个方法的不兼容,IKAnalyzer因��
�放弃JDK1.5的用户是不是不太值呢?毕竟很多旧系统都不愿意�
��JDK1.5更新到JDK1.6。希望您可以采纳我的建议,毕竟修复这个
问题非常简单!在这里先谢谢了!

Original comment by java_...@163.com on 22 May 2012 at 11:28

GoogleCodeExporter commented 8 years ago
您好,请问一下,如果不更新jdk版本的话,上面的问题有没��
�办法解决?

Original comment by huolong...@gmail.com on 5 Aug 2013 at 1:40