# Can't execute jar from directory with umlaut

Okay so this is quite an exotic question and I am unsure whether it really fits on this page. But as it involves LaTeX I'll post it here.

I have written a Java program that I am calling from inside LaTeX via \immedeiate\write18{java -jar <myJar>}. This works great except for this edge case:

1. I am in a directory that contains an umlaut in it's name (e.g. ä)
2. I am using lualatex to compile the document
3. (I am using Linux) My System is KDE Neon 5.16 with a 4.18 kernel. I am using TexLive 2018 and my lualatex version is 1.07.0

If all of these conditions are met the call fails with the message Error: LinkageError occurred while loading main class <name> java.lang.ExceptionInInitializerError: null.

I double-checked that I can call the jar from that directory via terminal and the call works when using e.g. pdflatex to compile the document (as soon as the umlaut is removed it also works with lualatex).

I also verified that I can write a lua script that calls the jar via os.execute(...) which is what lualatex uses via it's shellesc package to execute \write18 commands. However as soon as I do the same command from inside LaTeX (via \directlua) I get the error message stated above.
I also checked with print(_VERSION) that lualatex uses the same lua version I tested my external script in.

Does anybody know what the problem here might be? Are there some further things lualatex does to its lua-environment that could be the problem?
Any thought on this is welcome.

EDIT: A friend of mine does not have this issue on a windows machine (though I am not a hundred percent sure he is actually using lualatex as well)

EDIT2: Here's an MWE:

\documentclass{article}

\begin{document}
Some content so TeX won't complain
\directlua{os.execute("java -jar <PathToArbitraryJarFile>")}
\end{document}


Put above code in a folder called Testär (or something else with an umlaut) and compile the document with lualatex

EDIT 3:
I tested it on my new machine and at least now I can only reproduce the error when using latexmk with the -pdflatex=lualatex option.

This problem only and exclusively comes up in the case of a directory with an umlaut in its name (never checked other special characters tbh) ...

• Could you please show a MWE to reproduce the issue? – TeXnician Dec 14 '18 at 17:04
• @TeXnician done – Raven Dec 14 '18 at 17:42
• Which linux did you use in which version? Which tex distribution do you use in which version? Or is your issue already solved? How? – Mensch Jun 23 at 23:36
• Apparently this occurs only if using latexmk though... – Raven Jun 29 at 17:51