languagetool-org / languagetool

Style and Grammar Checker for 25+ Languages
https://languagetool.org
GNU Lesser General Public License v2.1
12.04k stars 1.38k forks source link

[jdk11] problem with dependencies #3303

Open firm1 opened 4 years ago

firm1 commented 4 years ago

Hello,

I have an dependency problem with your packages.

My gradle script look like :

dependencies {
...
compile group: 'org.languagetool', name: 'language-fr', version: '5.0'
}

When i run my code with this, i have some problem like

error: the unnamed module reads package org.languagetool.language from both language.fr and languagetool.core

Can you have an example of java project wich use jdk >= 9 with maven or gradle ?

chbriem commented 3 years ago

The code seems not to be compatible with Java 9+, because of split packages.

I'd suggest to at least add a hint to the documentation. The sentence

LanguageTool requires Java 8 or later.

is clearly wrong and should be "LanguageTool works with Java 8 only. Later versions are not yet fully supported."

miurahr commented 1 year ago

For SEO, I'd like to leave a precise comment to the issue.

More clearly said, LanguageTool works with Java 8 and later WITHOUT Java Platform Module System (JPMS) support.

All the project with configured with JPMS will get java.lang.module.ResolutionException error when booting your application, then detect package duplication and show a cause that LT languages are share the same package that is bad habit in modern Java.

It may be a possible solution for the application with JPMS that you may want to "unsplit" all the LanguageTool's language jars into a single custom module.

Because LanguageTool project don't take any action to solve the issue as in Sept. 2023, It is not easy to use LanguageTool in a project with JPMS enabled.

miurahr commented 11 months ago

Similar issue is reported in languagetool forum. https://forum.languagetool.org/t/java-11-dependencies-requirements/6155

LavishKothari commented 2 months ago

Do we have any timelines around when this issue will be fixed?

Given https://github.com/languagetool-org/languagetool/pull/9406 is a breaking change, and if we don't want to go ahead with this, can Languagetool export a fat jar (languagetool-core and language-en) so that there is a workaround for users for the interim time.

miurahr commented 1 month ago

Do we have any timelines around when this issue will be fixed?

Given #9406 is a breaking change, and if we don't want to go ahead with this, can Languagetool export a fat jar (languagetool-core and language-en) so that there is a workaround for users for the interim time.

9406 provide a compatibility module that keep users who implement JAVA8 base client to used as same as before.

It is for user who don't want to keep a legacy code. It also provide a breaking change with the legacy code to be JPMS compatible. Because modern project does not use a direct instantiation of language modules, but use recommended indirect way, that will be not broken with the change.