I was overjoyed at discovering on the Sigil website that Linux users could install a flatpack version of Sigil which would enable them to stay up to date. So when I moved up to UbuntuStudio 22.04LTS (with KDE Plasma desktop), I installed said flatpack version Sigil 1.9.20 which works fine except for the EpubCheck plugin.
Running epubcheck on my file gives the failure message:
Quote:
Status: failed
Traceback (most recent call last):
File "/app/share/sigil/plugin_launchers/python/launcher.py", line 142, in launch
self.exitcode = target_script.run(container)
File "/home/pnj/.var/app/com.sigil_ebook.Sigil/data/sigil-ebook/sigil/plugins/EpubCheck/plugin.py", line 250, in run
arch = get_arch(java_path)
File "/home/pnj/.var/app/com.sigil_ebook.Sigil/data/sigil-ebook/sigil/plugins/EpubCheck/plugin.py", line 36, in get_arch
_, stderr = jar_wrapper(*args)
File "/home/pnj/.var/app/com.sigil_ebook.Sigil/data/sigil-ebook/sigil/plugins/EpubCheck/plugin.py", line 56, in jar_wrapper
process = Popen(args, stdout=PIPE, stderr=PIPE, shell=False)
File "/usr/lib/python3.10/subprocess.py", line 969, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/usr/lib/python3.10/subprocess.py", line 1845, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'java'
Error: [Errno 2] No such file or directory: 'java'
|
'java -version' returns :
Quote:
openjdk version "18.0.2-ea" 2022-07-19
OpenJDK Runtime Environment (build 18.0.2-ea+9-Ubuntu-222.04)
OpenJDK 64-Bit Server VM (build 18.0.2-ea+9-Ubuntu-222.04, mixed mode, sharing)
|
and 'which java' returns: /usr/bin/java
I've tried editing the "java_path" line in the EpubCheck.json file to:
"java_path": "/usr/bin/java"
and to several variations - I tracked down the ultimate java executable at the end of links to:
/lib/jvm/java-18-openjdk-amd64/bin/java
and tried using that in the java_path variable but all I achieved was to alter the value of the 'No such file or directory' statement at the end of the failure message.
The epubcheck.jar file in my flatpack installation is located in this directory:
~/.var/app/com.sigil_ebook.Sigil/data/sigil-ebook/sigil/plugins/EpubCheck/
If I open a terminal in there and run "java -jar epubcheck.jar ~/Desktop/myebook.epub", it completes the check with an appropriate series of messages.
I expect my problem is complicated by the use of a flatpack version but I would be grateful for any help in correcting it.