Comments (5)
@0x1227 using java 21?
DCM
not support java 21 yet.
from java-dns-cache-manipulator.
java17 的javafx模块化使用时就会出现这个错误
from java-dns-cache-manipulator.
如果是模块化使用方式,要加相关的JVM
参数;参见项目文档的相应说明:@hanjiangjiaolong @0x1227
https://github.com/alibaba/java-dns-cache-manipulator?tab=readme-ov-file#jvm-settings-for-java-16
from java-dns-cache-manipulator.
<profiles>
<profile>
<id>add-java-open-options-for-jdk16+</id>
<activation>
<jdk>[16,)</jdk>
</activation>
<properties>
<argLine>
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/sun.net=ALL-UNNAMED
</argLine>
</properties>
</profile>
</profiles>
我没添加jvm参数,但是我添加了profiles,但是还是有错误,可以看下demo
from java-dns-cache-manipulator.
java-dns-cache-manipulator
库还没有做Java
模块化支持。java-dns-cache-manipulator
库在你工程中自动模块化了,自动分配的模块名是dns.cache.manipulator
。- (看到你在
module-info.java
中已经使用了) - Java 9 Modules - Automatic Modules
static ModuleFinder of(Path... entries)
- (看到你在
模块化应用运行如何使用添加选项可以查一下。JVM
选项在哪儿添加生效,和不同的运行方式相关。
上面Maven Profile
加的JVM
选项可以对mvn test
运行方式生效。
下面简单说明一下,可能有用;如果还有问题你自己查资料 & 排查一下吧:
要添加的选项及其值 是:
--add-opens java.base/java.net=dns.cache.manipulator --add-opens java.base/sun.net=dns.cache.manipulator
IDEA
运行方式添加方式:
from java-dns-cache-manipulator.
Related Issues (20)
- Issue on GitHub Actions with latest Zulu 8u352 JDK HOT 7
- child class java.net.InetAddress$NameServiceAddresses for class InetAddress.Addresses should never happens HOT 4
- support jdk 9 HOT 1
- Support config file name setting by -D option
- use specification test framework(BDD) rewrite unit test HOT 1
- 使用SSM整合HttpClient,使用工具包设置DNS,打印出来的DNS为最新的,但是请求时调用的DNS为缓存的设置 HOT 3
- 多个jvm进程怎么共享一个dns?
- how to share dns in all jvm process? HOT 1
- Support JDK 11 HOT 10
- 可以使用这个开发成1个dns服务器 HOT 1
- 什么时候可以支持 JKD 11 呢 HOT 2
- Fix "argument_count" issue in tool/src/main/java/com/alibaba/dcm/tool/DcmTool.java
- Fix "similar-code" issue in library/src/main/java/com/alibaba/dcm/agent/DcmAgent.java
- Fix "identical-code" issue in library/src/main/java/com/alibaba/dcm/internal/InetAddressCacheUtilForJava8Minus.java
- Fix initFieldsOfInetAddressCachePolicy method issue in library/src/main/java/com/alibaba/dcm/internal/InetAddressCacheUtilCommons.java
- Fix "method_complexity" issue in library/src/main/java/com/alibaba/dcm/internal/InetAddressCacheUtilForJava8Minus.java
- Fix Method inetAddress$Addresses2DnsCacheEntry issue in InetAddressCacheUtilForJava9Plus
- Fix "squid:S00112" issue in library/src/main/java/com/alibaba/dcm/agent/DcmAgent.java
- jdk11支持吗
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from java-dns-cache-manipulator.