Giter Club home page Giter Club logo

Comments (7)

headius avatar headius commented on July 23, 2024 1

@V-F Is this not already fixed by 4b198d2? That change went out in 1.3.1.

If there's something more we need to do, please let us know!

from jffi.

headius avatar headius commented on July 23, 2024 1

FWIW if this is still an issue I do not know of a reason we have to keep separating out the native jar. We do not release them independently.

However it seems like this is a more general problem. My understanding was that this native artifact is the proper way to package a JNI library with Maven, in which case how do other projects then access that library given module restrictions?

We are happy to do the right thing here, but what is the right thing?

from jffi.

headius avatar headius commented on July 23, 2024 1

this solves my problem

Great! Thank you for confirming.

It would be great if all jnr-libraries had a module descriptor

Are you looking for an explicit module-info rather than automatic module name? All the JNR libraries gained automatic module names plus build and code fixes to support Java 9+ a few months back. Adding module-info wouldn't be difficult at this point, but it would force the build to always use Java 9+ (currently it can still build on Java 8).

from jffi.

headius avatar headius commented on July 23, 2024 1

force the build to always use Java 9+

... or at least make the build more complicated to keep supporting Java 8. It is a bit cumbersome to provide module-info in a jar that still works on Java 8, which is why we only did automatic module names.

from jffi.

headius avatar headius commented on July 23, 2024 1

I am going to close this as fixed in 1.3.1, since that is the release when we gave the native jar its own module name.

@oobles @V-F If there's further work needed, like fully going to module-info, please open a new issue for that (or a PR ❤️).

from jffi.

V-F avatar V-F commented on July 23, 2024

Hello, @headius.
Is supporting of modular architecture planned?
I wanted to ask to add the Automatic-Module-Name to the MANIFEST.MF file, since in a modular application the both files (eg. jffi-1.2.23.jar and jffi-1.2.23-native.jar) have the same module name:

java.lang.module.FindException: Two versions of module jffi found in X:\release (jffi-1.2.23.jar and jffi-1.2.23-native.jar)

But considering the above problem the only solution would be also to combine the content of both files into the new one.
Thank you.

from jffi.

V-F avatar V-F commented on July 23, 2024

Thanks for the quick response.
You are right, I didn't notice that the manifest in the jffi-1.3.1-native.jar file already contains Automatic-Module-Name, which allows to distinguish this automatic module from the jffi automatoc module of the jffi-1.3.1.jar file (which doesn't contain Automatic-Module-Name in it manifest) and this solves my problem.
Regarding the error indicated by @oobles at the moment I have no way to check for its existence, but considering that the resource is not encapsulated and the automatic module exports all it packages, everything should work.
It would be great if all jnr-libraries had a module descriptor, then they could be used by jlink without additional effort.

from jffi.

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.