How to let an automatic module find its own resources in Java 9?

前端 未结 1 1628
青春惊慌失措
青春惊慌失措 2021-01-05 09:53

I am trying to get my application to run with Java 9, but unfortunately one of the plain jar dependencies, when it tries to load a resource using classLoader.getResour

1条回答
  •  轻奢々
    轻奢々 (楼主)
    2021-01-05 10:29

    Try to add an 'opens' declaration to the automatic module 'ivy'. That allows access to it's resources:

    java --add-opens ivy/=ALL-UNNAMED --module-path my-mod.jar:ivy-2.4.0.jar -m my.mod
    

    0 讨论(0)
提交回复
热议问题