Giter Club home page Giter Club logo

Comments (5)

oldratlee avatar oldratlee commented on June 14, 2024

@0x1227 using java 21?

DCM not support java 21 yet.

from java-dns-cache-manipulator.

hanjiangjiaolong avatar hanjiangjiaolong commented on June 14, 2024

java17 的javafx模块化使用时就会出现这个错误

from java-dns-cache-manipulator.

oldratlee avatar oldratlee commented on June 14, 2024

如果是模块化使用方式,要加相关的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.

hanjiangjiaolong avatar hanjiangjiaolong commented on June 14, 2024

javafx.zip
@oldratlee

<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.

oldratlee avatar oldratlee commented on June 14, 2024

@hanjiangjiaolong


模块化应用运行如何使用添加选项可以查一下。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运行方式添加方式:

image

from java-dns-cache-manipulator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.