dnaber We are still struggling with LT
We used this process to create three JAR files from the down loaded LT zip file
cd C:\Users\Dwight\Documents\A A A A A LT UnZip\LanguageTool-4.7\LanguageTool-4.7
jar cf languagesLIBS.jar libs/*
jar cf languagesORG.jar org/*
jar cf languagesMETA.jar META-INF/*
Then in Netbeans 8.2 we used this process to place the JAR files in the Dependencies folder
Here is where it gets odd to our limited knowledge of adding Dependencies to Netbeans
- Open the Projects tab.
- Right-click on Dependencies .
- Select Add dependency .
- Set groupId to: language(can be anything)
- Set artifactId to: en (can be anything)
- Set version to: 4.7(can be anything)
- Click Add to continue.
Dependency is added to pom.xml and appears under the Libraries node of Maven project. Continue:
- Expand Dependencies .
- Right-click on library (e.g., group.id ).
- Select Manually install artifact .
- Set Artifact to install with the Java Archive (.jar) file path.
- Click Install locally .
When we do a Clean and Build on the project we get these Warnings
The POM for languagetool:LIBS:jar:4.7 is missing, no dependency information available
The POM for languagetool:ORG:jar:4.7 is missing, no dependency information available
The POM for languagetool:META:jar:4.7 is missing, no dependency information available
We have made the call to JLanguageTool thread safe with this code
static JLanguageTool langTool;
private static void ini(){<br>
new Thread(() -> {<br>
langTool = new JLanguageTool(new AmericanEnglish());<br>
}).start(); <br>
}<br>
This call to the ini() method produces this error
Exception in thread “Thread-4” java.lang.NoClassDefFoundError: com/google/common/cache/CacheLoader
at com.mycompany.maventest.CheckSpellController.lambda$ini$0(CheckSpellController.java:43)
at java.lang.Thread.run(Thread.java:748)
Caused by: java.lang.ClassNotFoundException: com.google.common.cache.CacheLoader
at java.net.URLClassLoader.findClass(URLClassLoader.java:382)
at java.lang.ClassLoader.loadClass(ClassLoader.java:424)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:349)
at java.lang.ClassLoader.loadClass(ClassLoader.java:357),br>
Netbeans thinks the files in question are here SEE IMPORTS
import org.languagetool.JLanguageTool;
import org.languagetool.language.AmericanEnglish;
import org.languagetool.rules.RuleMatch;
When we look in the created JAR files in the Dependencies folder we can not find
JLanguageTool nor can we find RuleMatch
QUESTION Why does Netbeans think these are in the location the import code imported from?
Also when we search for LT we only find 4.6 version see screen shot
We do find 4.7 as local when search for org.languagetool:languagetool-core
We are trying to make this work and realize you have other work but it is not as if
we are asking for you to write the code
Thanks for your time
Dwight