GithubHelp home page GithubHelp logo

Comments (10)

oldratlee avatar oldratlee commented on May 7, 2024 3

@arcuri82 @antfling

Released v1.6.1: JDK 17 support improvement
https://github.com/alibaba/java-dns-cache-manipulator/releases/tag/v1.6.1

add below java options for JDK 17:

--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/sun.net=ALL-UNNAMED

remove sun.net.util.IPAddressUtil dependency, simplify JDK 17 usage, so no need java option --add-opens java.base/sun.net.util=ALL-UNNAMED

from java-dns-cache-manipulator.

oldratlee avatar oldratlee commented on May 7, 2024

Jdk 9及以上的支持 还没做, 😩

要不要 来搞一下? ❤️

from java-dns-cache-manipulator.

antfling avatar antfling commented on May 7, 2024

我今天改了下代码,发现最后由于jdk9以上的modul的封装问题,没有权限修改java.base中的反射,我可以先把代码提交一下
@oldratlee

from java-dns-cache-manipulator.

arcuri82 avatar arcuri82 commented on May 7, 2024

Hi!
I apologize for writing in English, but better than trying to copy&paste here what Google Translate would give...

Anyway, I ended up here because I needed the exact functionality this library provides! Thanks for open-sourcing it!
But as you might have guessed, I would need support for JDK9+ (just 11 to be specific).

Reflection on java.net gives nasty warnings in JDK 11, but still works. If one does not like the warnings, can use --add-opens java.base/java.net=ALL-UNNAMED as a VM option (ugly, but still better than nothing). Or is there some other issue here that prevents supporting JDK11?

This issue and PR is 1 year old. So I guess it will not be merged and new release of library will be made?
That's understandable. But just wanted to double-check with you before spending time re-implementing something equivalent

again, thanks!

from java-dns-cache-manipulator.

antfling avatar antfling commented on May 7, 2024

@arcuri82
Hi!
Thank you replay this issue.I Test this branch at environment jdk9 cant run.but i test jdk11 can run.this you answer.
i will review this code and test jdk11 and jdk 13 to run at this week, i would't to support jdk9 or jdk 10. so if you can wait,i will try again.

from java-dns-cache-manipulator.

arcuri82 avatar arcuri82 commented on May 7, 2024

excellent! thx!
I am only interested in LTS versions of the JDK (ie 8 and 11, where the next one will be 17 in a couple of years). I have no interest in 9 and 10... so that's good :)

from java-dns-cache-manipulator.

antfling avatar antfling commented on May 7, 2024

@arcuri82 @oldratlee #51 you can see this PR. the 50 PR because i have change name so you can't see it. i fix some bug and change some test unit case that make new PR. if you want use. you can package yourself.

from java-dns-cache-manipulator.

oldratlee avatar oldratlee commented on May 7, 2024

@antfling @arcuri82 and @ethanmnrd #51 (comment)
JDK 11 is supported at v1.6.0-RC1:
https://github.com/alibaba/java-dns-cache-manipulator/releases/tag/v1.6.0-RC1

If there is any problems in use JDK 11, we can continue the discussion at this issue.


This issue and PR is 1 year old. So I guess it will not be merged and new release of library will be made?

sorry for my slooooow reply 😖 , and thanks for all your concern.

from java-dns-cache-manipulator.

oldratlee avatar oldratlee commented on May 7, 2024

I am only interested in LTS versions of the JDK (ie 8 and 11, where the next one will be 17 in a couple of years).

@arcuri82 @antfling

I have tested v1.6.0-RC1 under JDK 17(17.0.0-ms and 17.0.0.35.2-amzn),
and the test successed with --add-opens options, like:

--add-exports java.base/sun.net=ALL-UNNAMED
--add-exports jdk.unsupported/sun.misc=ALL-UNNAMED
--add-exports java.base/jdk.internal.misc=ALL-UNNAMED
--add-exports java.base/java.net=ALL-UNNAMED
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/sun.net=ALL-UNNAMED
...

I am going to find out the minimus option set to run java-dns-cache-manipulator properly.

from java-dns-cache-manipulator.

oldratlee avatar oldratlee commented on May 7, 2024

I am going to find out the minimus option set to run java-dns-cache-manipulator properly.

@arcuri82 @antfling

I found out a minimus option set to run java-dns-cache-manipulator under jdk17 properly:

--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/sun.net=ALL-UNNAMED
--add-opens java.base/sun.net.util=ALL-UNNAMED

local additionalOptionsForJava11Plus
versionGreatEqThan $(__getJavaVersion) 12 && additionalOptionsForJava11Plus=(
--add-opens java.base/java.net=ALL-UNNAMED
--add-opens java.base/sun.net=ALL-UNNAMED
--add-opens java.base/sun.net.util=ALL-UNNAMED
)


Add JDK 17 into AppVeyor CI and succeed:

https://ci.appveyor.com/project/oldratlee/java-dns-cache-manipulator/builds/41467673/job/laxjnrpagsky5i6w#L764

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.