Java,错误:发生了JNI错误,请检查您的安装并再次尝试线程“main”中的异常java.lang.SecurityException:

当我试图在ItelliJ IDEA中的Maven中组装的命令行jar文件中运行时,我遇到了以下问题 .

Error: A JNI error has occurred, please check your installation and try again

线程“main”中的异常java.lang.SecurityException:java.base / sun.security中java.base / sun.security.util.SignatureFileVerifier.processImpl(SignatureFileVerifier.java:330)上Manifest主要属性的签名文件摘要无效 . util.SignatureFileVerifier.process(SignatureFileVerifier.java:263)位于java.base / java.util.jar.JarVerifier.processEntry(JarVerifier.java:316)java.base / java.util.jar.JarVerifier.update(JarVerifier . java:230)java.base上的java.base / java.util.jar.JarFile.initializeVerifier(JarFile.java:720)java.base上的java.base / java.util.jar.JarFile.getInputStream(JarFile.java:801) /jdk.internal.loader.URLClassPath$JarLoader$2.getInputStream(URLClassPath.java:799)位于java.base / jdk.internal的java.base / jdk.internal.loader.Resource.cachedInputStream(Resource.java:77)中 . java.base / jdk.internal.loader.BuiltinClassLoader.findClassOnClassPat上的java.base / jdk.internal.loader.BuiltinClassLoader.defineClass(BuiltinClassLoader.java:792)中的loader.Resource.getByteBuffer(Resource.java:161) hOrNull(BuiltinClassLoader.java:699)在java.base / jdk.internal.loader.BuiltinClassLoader.loadClassOrNull(BuiltinClassLoader.java:622)java.base / jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:580) at java.base / jdk.internal.loader.ClassLoaders $ AppClassLoader.loadClass(ClassLoaders.java:185)at java.base / java.lang.ClassLoader.loadClass(ClassLoader.java:496)at java.base / java.lang java.base上的.class.forName0(Native Method),java.base / sun.launcher.LauncherHelper.loadMainClass(LauncherHelper.java:654)的java.base / java.lang.Class.forName(Class.java:375) /sun.launcher.LauncherHelper.checkAndLoadMain(LauncherHelper.java:551)

有没有人知道是什么导致这个SecurityException以及如何解决这个问题?我似乎尝试了在这个论坛上讨论的所有内容,但遗憾的是没有任何帮助......
我正在使用:Windows 10,Java 9.0.4,Maven 3.5.3,ItelliJ IDEA 2017.3.4

这是pom.xml文件:

<packaging>jar</packaging>
<dependencies>
    <dependency>
        <groupId>org.telegram</groupId>
        <artifactId>telegrambots</artifactId>
        <version>3.6</version>
    </dependency>
    <dependency>
        <groupId>org.telegram</groupId>
        <artifactId>telegrambots-meta</artifactId>
        <version>3.6</version>
    </dependency>
    <dependency>
        <groupId>org.web3j</groupId>
        <artifactId>core</artifactId>
        <version>3.3.1</version>
    </dependency>
    <dependency>
        <groupId>org.web3j</groupId>
        <artifactId>crypto</artifactId>
        <version>3.3.1</version>
    </dependency>
    <dependency>
        <groupId>com.squareup.okhttp3</groupId>
        <artifactId>okhttp</artifactId>
        <version>3.10.0</version>
    </dependency>
    <dependency>
        <groupId>org.jumpmind.symmetric.jdbc</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.2-1002-jdbc4</version>
    </dependency>
    <dependency>
        <groupId>org.sat4j</groupId>
        <artifactId>org.sat4j.core</artifactId>
        <version>2.3.1</version>
    </dependency>
</dependencies>

<build>
    <plugins>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-shade-plugin</artifactId>
            <version>3.1.0</version>
            <executions>
                <execution>
                    <phase>package</phase>
                    <goals>
                        <goal>shade</goal>
                    </goals>
                    <configuration>
                        <transformers>
                            <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
                                <mainClass>SimpleBot</mainClass>
                            </transformer>
                        </transformers>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-dependency-plugin</artifactId>
            <version>3.0.2</version>
            <executions>
                <execution>
                    <id>unpack-dependencies</id>
                    <phase>package</phase>
                    <goals>
                        <goal>unpack-dependencies</goal>
                    </goals>
                    <configuration>
                        <excludes>META-INF/*.SF,META-INF/*.DSA,META-INF/*.RSA</excludes>
                    </configuration>
                </execution>
            </executions>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-compiler-plugin</artifactId>
            <configuration>
                <source>1.9</source>
                <target>1.9</target>
            </configuration>
        </plugin>
    </plugins>
</build>

提前致谢 .

回答(0)