Java Jar hell Runtime Exception

走远了吗. 提交于 2019-11-30 23:49:29
devanathan

I have fixed it by overriding the JarHell class in the unit test sorce folder.

Steps I have done

  1. create a separate package in the test folder.

    org.elasticsearch.bootstrap

  2. Create a new class and paste the following code.

package org.elasticsearch.bootstrap;

import java.net.URL;

public class JarHell {
    private JarHell() {}
    public static void checkJarHell() throws Exception {}
    public static void checkJarHell(URL urls[]) throws Exception {}
    public static void checkVersionFormat(String targetVersion) {}
    public static void checkJavaVersion(String resource, String targetVersion) {}
    public static URL[] parseClassPath() {return new URL[]{};}
}
  1. Issue was fixed while doing the gradlew build.

  2. To run the integration test separately add the below line to VM arguments in the run configurations.

    -ea -Dtests.security.manager=false
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!