天天看点

使用eclipse 编译elasticsearch 7.6.4小结

今天花了不少时间,编译好了elasticsearch 7.6.4,简单总结如下:

  1. 需要安装jdk 13
  2. 测试代码使用了com.sun.net.httpserver.HttpExchange ,因此需要关闭限制 “Access restriction on class due to restriction on required library rt.jar”,执行如下动作:

    On Windows: Windows -> Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API -> Forbidden reference (access rules): -> change to warning

    On Mac OS X/Linux: Eclipse -> Preferences -> Java -> Compiler -> Errors/Warnings -> Deprecated and restricted API -> Forbidden reference (access rules): -> change to warning

    shareimprove this answer

  3. 项目中大量循环依赖,需要执行以下动作

    Mark circular dependencies as “Warning” in Eclipse tool to avoid “A CYCLE WAS DETECTED IN THE BUILD PATH” error.

    In Eclipse go to:

    Windows -> Preferences -> Java-> Compiler -> Building -> Circular Dependencies

  4. 默认过程中测试需要很长时间,如果不等待可以在build

继续阅读