Back to LanguageTool Homepage - Privacy - Imprint

Could not export dictionary

When executing command
“java -cp languagetool-standalone.jar org/languagetool/resource/en/english.dict >dictionary.dump”
as described here:
I receive following error:
“Could not find or load main class”

You need a recent snapshot version for that from;O=D

I downloaded most recent snapshot (

The file is now called languagetool.jar instead of languagetool-standalone.jar.

Thank you very much.

In folder languagetool/languagetool-standalone/target/LanguageTool-3.4-SNAPSHOT/LanguageTool-3.4-SNAPSHOT

I executed:
java -cp languagetool.jar dictionary.dump org/languagetool/resource/en/

Leading to this error:
Error: Could not find or load main class

I’ve tried editing to make sure the necessary resource should be in the path. I’ve also searched down the and added it to the path (though this seems a bit funny since the CPATH env variable contains only .JAR files).

The files used were just freshly compiled from the updated repository.

@arysin, I think you moved the code, could you update

Right now I’m playing around with the dictionary as well. Yes, there were changes that should go to the Wiki (I already asked for it at the developers mailing list)

But for now, you can have a look at my lab, in I have embedded dictionary manipulation: extraction and building both dictionary and synthesizer.

At line 40 is what you are looking for:

function dict_build {
  java -cp ../languagetool-tools.jar \
  -i dictionary.dump \
  --info ../dist/org/languagetool/resource/es/ \
  -o ../dist/org/languagetool/resource/es/spanish.dict
#  -freq freq.xml

Please replace your dictionary as required

I’ve updated the Wiki now, the commands at should work now.


I tried the updated instructions.

Juan, I also tried your dict_build function.

However I continue to be completely stuck with this:

java -cp ../languagetool-tools.jar

Error: Error: Could not find or load main class

Where is it? And where do I execute this command to begin with?

I’ve been running this in languagetool-standalone/target/LanguageTool-3.4-SNAPSHOT/LanguageTool-3.4-SNAPSHOT and other similar places.

This works for me:

cd LanguageTool-3.4-SNAPSHOT/
(create a dictionary.dump file)
java -cp languagetool.jar -i dictionary.dump -info org/languagetool/resource/en/ -o output.dict

It worked!

I think maybe I messed something up while working on my fork. I will recompile and compare the compilation output to see what might have gone wrong, so that I can restore my fork.

Thanks for all your help!