Problems when trying to add custom spelling.txt


I’m facing some issues with adding a custom spelling.txt to LanguageTool.

As described here: Custom Ignore and Spelling Files for server side integration - #10 by Patrik
It says, you can just add your custom file to e.g. GermanyGerman and pass it to the method getSpeller in the class GermanSpellRule.
I get a few errors (see attached image).

In my code, I’ve added a constructor in GermanyGerman, updated the construcor in German and added the path as a variable to GermanSpellerRule. I’ve also updated the swiss and austrian files.

  private final String PATH;
  public GermanyGerman(String path) {
		this.PATH = path;

  public String[] getCountries() {
    return new String[]{"DE"};

  public String getName() {
    return "German (Germany)";

  public List<Rule> getRelevantRules(ResourceBundle messages) throws IOException {
    List<Rule> rules = new ArrayList<>(super.getRelevantRules(messages));
    rules.add(new GermanSpellerRule(messages, this, this.PATH));
    return rules;

What else do I have to consider?


I forgot to keep the empty constructor in GermanyGerman and German