Hi, I clone lucene 4.10.4 tag from github and use ant to build.
My ant and local jdk in mac info: *Apache Ant(TM) version 1.9.9 compiled on February 2 2017* *Trying the default build file: build.xml* *Buildfile: /Users/yozhao/src/lucene-solr/lucene/core/build.xml* *Detected Java version: 1.7 in: /Library/Java/JavaVirtualMachines/jdk1.7.0_45.jdk/Contents/Home/jre* *Detected OS: Mac OS X* I use simple one word "ant" command to build the jar, and copy the jar to my Centos server. Jdk in the server is 1.7.0_67 But when I start my service, exception thrown 20 Exception in thread "main" java.lang.NoSuchMethodError: java.nio.ByteBuffer.position(I)Ljava/nio/ByteBuffer; 21 at org.apache.lucene.store.ByteBufferIndexInput$SingleBufferImpl.<init>(ByteBufferIndexInput.java:418) 22 at org.apache.lucene.store.ByteBufferIndexInput.newInstance(ByteBufferIndexInput.java:55) 23 at org.apache.lucene.store.MMapDirectory.openInput(MMapDirectory.java:199) 24 at org.apache.lucene.store.NRTCachingDirectory.openInput(NRTCachingDirectory.java:198) 25 at org.apache.lucene.store.Directory.openChecksumInput(Directory.java:113) 26 at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:836) 27 at org.apache.lucene.index.SegmentInfos$FindSegmentsFile.run(SegmentInfos.java:769) This should be some issue with jdk version. I compile in 1.7.0_45 and run in 1.7.0_67 why can this happen?