question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Make Lingua usable within Java 9 modules

See original GitHub issue

I’ve added lingua to my build.gradle like so:

dependencies {
    implementation 'com.github.pemistahl:lingua:1.1.1'
}

My module-info.java requires it like so:

module com.linguatest {
    requires lingua;
}

Still, it doesn’t compile:

C:\Users\Bucko\Projects\linguatest\src\main\java\module-info.java:2: error: module not found: lingua
    requires lingua;
             ^

What configuration do I need to do to get my project to recognize lingua as a module? (This was all done in a blank Hello World project with default IntelliJ gradle project settings. Other dependencies I add are recognized, but lingua is not.)

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
mediumrarezcommented, Jan 25, 2022

@pemistahl I’ll be looking forward to it. I’m planning to use it for short text, so lingua is a perfect fit. Thanks for the fast reply.

1reaction
pemistahlcommented, Jan 25, 2022

Hi @drinkitup777, thank you for trying out my library and for your question. I have no experience with Java 9 modules so far but it seems that I have to add a module-info.java file to the library to make it work. This is mentioned in the Gradle docs. I will add this in the near future.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Java 9+ modularity: Module basics and rules - IBM Developer
Explore the basic mechanisms, tools, and rules that you can use to leverage the modular capabilities of Java 9+ and the JPMS to...
Read more >
A Guide to Java 9 Modularity - Baeldung
Learn the essentials of building and using modules in Java 9. Start down the path of modularizing your code today.
Read more >
Understanding Java 9 Modules - Oracle
In this article, I introduce the Java 9 Platform Module System (JPMS), the most important new software engineering technology in Java since its...
Read more >
Java 9 Modules - A guide to understanding them - Xperti
Java modules are considered one of the finest features introduced in Java 9. Find out what are Java modules and why every Java...
Read more >
I've never used modules before. What is special about Java ...
The first part of the module system is an effort to split the core java libraries into lots of small modules according to...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found