Having a lot a problem finding the .jar files to put into my build path.
The website says this:
If you don’t use Maven (or a similar system), download the stand-alone ZIP instead. You will need the JAR files in the libs directory and everything in the org directory in your classpath.
This is not that clear to someone who is not the best at coding java. I get the lib part, but adding everying in the org directory to your classpath? Why do you guys do it like this? Why not just create one .jar file or something to add like the rest in lib? Instead of having .class files in a class folder?
Still not sure why there is not already a complete .jar made. I do not want to use gradle or maven. So i guess i gotta read up on how to create my own .jar from class flies.
I don’t know Eclipse, but that sounds correct. The org older needs to be in the classpath, just make sure it’s the org folder itself, not the folders inside that folder.
ok thanks got it now. But like other people in that thread
I am getting the error:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at com.sun.javafx.application.LauncherImpl.launchApplicationWithArgs(LauncherImpl.java:389)
at com.sun.javafx.application.LauncherImpl.launchApplication(LauncherImpl.java:328)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at sun.launcher.LauncherHelper$FXHelper.main(Unknown Source)
Caused by: java.lang.IllegalArgumentException: 'en' is not a language code known to LanguageTool. Supported language codes are: xx-XX. The list of languages is read from META-INF/org/languagetool/language-module.properties in the Java classpath. See http://wiki.languagetool.org/java-api for details.
at org.languagetool.Languages.getLanguageForShortCode(Languages.java:161)
at org.languagetool.synthesis.en.EnglishSynthesizer.<init>(EnglishSynthesizer.java:61)
at org.languagetool.rules.en.AbstractEnglishSpellerRule.<init>(AbstractEnglishSpellerRule.java:34)
at org.languagetool.rules.en.MorfologikAmericanSpellerRule.<init>(MorfologikAmericanSpellerRule.java:34)
at org.languagetool.language.AmericanEnglish.getRelevantRules(AmericanEnglish.java:46)
at org.languagetool.JLanguageTool.getAllBuiltinRules(JLanguageTool.java:247)
at org.languagetool.JLanguageTool.<init>(JLanguageTool.java:167)
at org.languagetool.JLanguageTool.<init>(JLanguageTool.java:152)
at application.Main.main(Main.java:34)
... 11 more
Exception running application application.Main
I did add the META-INF to classpath but you posted in that thread:
After “zip -r languages.jar META-INF/ org/” you need to add languages.jar to your classpath. How to do that exactly depends on your local environment or IDE.
Am I also supposed to add “languagetool.jar” to the classpath as well? This .jar comes with stand-alone download.
I had that in the classpath.
I now removed it and now getting:
The type org.languagetool.language.English cannot be resolved. It is indirectly referenced from required .class files
The constructor JLanguageTool(AmericanEnglish) is undefined
When I had that jar in the classpath i was using: import org.languagetool.language.AmericanEnglish;
but now I would have to just use the package name from the org folder: languagetool.language.AmericanEnglish;