Unable to make field private final java.lang.String java.io.File.path accessible: module java.base

最近老是遇到这个问题,因为需求经常变动,所以经常会去看三方库的Demo,但是build的时候老是爆这个错。

Unable to make field private final java.lang.String java.io.File.path accessible: module java.base does not “opens java.io” to unnamed module @4f3bc4f

原因:其实就是java版本过高,三方库的版本一般较低,所以你的把版本降低一下。

方法一:

降低项目的java版本,选个1.8就行了,之前默认是jbr_17

方法二:在项目的gradle.properties文件,在org.gradle.jvmargs配置进行修改,

添加

-add-exports=java.base/sun.nio.ch=ALL-UNNAMED \
  --add-opens=java.base/java.lang=ALL-UNNAMED \
  --add-opens=java.base/java.lang.reflect=ALL-UNNAMED -\
  -add-opens=java.base/java.io=ALL-UNNAMED \
  --add-exports=jdk.unsupported/sun.misc=ALL-UNNAMED

 同步即可!

  • 11
    点赞
  • 15
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 5
    评论
Programming skills are indispensable in today’s world, not just for computer science students, but also for anyone in any scientific or technical discipline. Introduction to Programming in Java, Second Edition, by Robert Sedgewick and Kevin Wayne is an accessible, interdisciplinary treatment that emphasizes important and engaging applications, not toy problems. The authors supply the tools needed for students and professionals to learn that programming is a natural, satisfying, and creative experience, and to become conversant with one of the world’s most widely used languages. This example-driven guide focuses on Java’s most useful features and brings programming to life for every student in the sciences, engineering, and computer science. Coverage includes Basic elements of programming: variables, assignment statements, built-in data types, conditionals, loops, arrays, and I/O, including graphics and sound Functions, modules, and libraries: organizing programs into components that can be independently debugged, maintained, and reused Algorithms and data structures: sort/search algorithms, stacks, queues, and symbol tables Applications from applied math, physics, chemistry, biology, and computer science Drawing on their extensive classroom experience, throughout the text the authors provide Q&As;, exercises, and opportunities for creative engagement with the material. Together with the companion materials described below, this book empowers people to pursue a modern approach to teaching and learning programming. Companion web site (introcs.cs.princeton.edu/java) contains Chapter summaries Supplementary exercises, some with solutions Detailed instructions for installing a Java programming environment Program code and test data suitable for easy download Detailed creative exercises, projects, and other supplementary materials Companion studio-produced online videos (informit.com/sedgewick) are available for purchase and provide students and professionals with th
单词 音标 注释 a collection of… 一组… a couple of… 几个 a kind of 一种 a number of… 许多… a point in time n.时间点 a set of… 一组… a series of 一系列 ability [ə'bɪlətɪ] n.能力 absence [ˈæbsəns] n.缺席,不存在 absolute [ˈæbsəlu:t] adj.绝对的 abstract [ˈæbstrækt] adj.抽象的 abstraction [æbˈstrækʃn] n.抽象 access [ˈækses] v.访问 accessed adj.访问的 accessible [əkˈsesəbl] adj.可访问的 accessor [ˈæksesə] n.访问 accidental [ˌæksɪˈdentl] adj.意外的 accommodate [ə'kɒmədeɪt] v.容纳,适应 accompany [ə'kʌmpənɪ] v.陪同 accomplish [ə'kʌmplɪʃ] v.完成 accordion [əˈkɔ:diən] adj.可折叠的 account [ə'kaʊnt] accountable [əˈkaʊntəbl] adj.负有责任的 accumulate [ə'kju:mjəleɪt] v.累积 accurate [ˈækjərət] adj.精确的 act as… v.充当… action [ˈækʃən] n.操作 activation [ˌæktɪ'veɪʃn] n.激活 active [ˈæktɪv] adj.活跃的 actively ['æktɪvlɪ] adv.主动地 actual [ˈæktʃuəl] adj.真实的 actually [ˈæktʃuəli] adv.实际上 across… 在…间 adaptation [ˌædæp'teɪʃn] n.改编 adapter [əˈdæptə] n.适配器 add [æd] v.增加 adequate [ˈædɪkwət] adj.足够的 addition [əˈdɪʃn] n.加 additional [ə'dɪʃənl] adj.附加的 address [əˈdres] n.地址 adjacent [əˈdʒeɪsnt] adj.邻近的 adjust [ə'dʒʌst] v.调整 advance [əd'vɑ:ns] v.提前,向前一步 advance..past.. 将…移至…后 advise [əd'vaɪz] v.建议 affect [ə'fekt] v.影响 ahead [əˈhed] adv.预先 alert [ə'lɜ:t] v.警示 alias [ˈeɪliəs] n.别名 align [əˈlaɪn] v.对齐 algorithm ['ælɡərɪðəm] n.算法 allocate ['æləkeɪt] v.分配 allocation [ˌæləˈkeɪʃn] n.分配 alow v.支持 allowable [əˈlaʊəbl] adj.允许的 alone [əˈləun] adj.单独的 along with… 以及…

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 5
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

&岁月不待人&

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值