gpt4 book ai didi

maven:发生了非法的反射访问操作

转载 作者:行者123 更新时间:2023-12-03 18:32:00 30 4
gpt4 key购买 nike

在执行任意 mvn 命令时,我会在日志开头收到以下警告:

WARNING: An illegal reflective access operation has occurred
WARNING: Illegal reflective access by com.google.inject.internal.cglib.core.$ReflectUtils$1 (file:/usr/share/maven/lib/guice.jar) to method java.lang.ClassLoader.defineClass(java.lang.String,byte[],int,int,java.security.ProtectionDomain)
WARNING: Please consider reporting this to the maintainers of com.google.inject.internal.cglib.core.$ReflectUtils$1
WARNING: Use --illegal-access=warn to enable warnings of further illegal reflective access operations
WARNING: All illegal access operations will be denied in a future release
不幸的是,这些警告有时会导致运行时出错并中断我的 maven 命令执行。有谁知道如何解决这个问题并摆脱这些警告?
我的maven版本:
Apache Maven 3.5.2
Maven home: /usr/share/maven
Java version: 11.0.2, vendor: Azul Systems, Inc.
Java home: /usr/lib/jvm/zulu-11-amd64
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.15.0-47-generic", arch: "amd64", family: "unix"

最佳答案

我最好的猜测:你的 guice版本与 Java 11 不兼容。

关于maven:发生了非法的反射访问操作,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55492394/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com