Page 1 of 1

quick fix for running on Linux when jar doesn't work

Posted: Thu Mar 05, 2020 11:50 pm
by woat
I want to leave this here for anyone who comes after me having trouble getting MapTools to run on Linux. The jar proved impossible for me to get running no matter what version of java I used even with JavaFX. There is a dirty fix though. Just extract the Maptool folder from the official deb using your favorite archive manager (I used Ark). It includes working binary dependencies for maptools.

The deb structure is maptool.deb/data.tar.xz/opt/MapTool/ . Simply extract that folder and run MapTool. I hope that saves you some time so you don't have to spend hours trying to get the jar to run like I did.

keywords
linux fedora arch ubuntu javafx openjfx

Re: quick fix for running on Linux when jar doesn't work

Posted: Tue Apr 28, 2020 10:47 pm
by ~ash
Also in the interest of helping anyone who stumbles upon this...

I tried this method of installation, but got a core dump somewhere in the font initialisation process -- the stacktrace ended at sun.font.FontConfigManager.getFontConfig at least. I had various font packages installed, but none of them included Lucida Console, which based on the source code is I think MapTool's default font.

I had to track down the lucida ttf files and install them (copying to ~/.local/share/fonts is one way, more here: https://askubuntu.com/questions/3697/ho ... tall-fonts).

Having the font available on my Linux system made it work. Hope this helps anyone else with the same problem.

Re: quick fix for running on Linux when jar doesn't work

Posted: Tue May 19, 2020 6:52 pm
by woat
This method seems to no longer work. Trying to run the new Maptools 1.7.0 on Fedora 32 fails with the error.

[[email protected] MapTool]$ ./MapTool
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.

I don't know why as it seems to bundle the same dependencies as before. Maybe it's a Fedora specific bug.

Re: quick fix for running on Linux when jar doesn't work

Posted: Wed Jun 24, 2020 7:58 pm
by woat
~ash wrote:
Tue Apr 28, 2020 10:47 pm
Also in the interest of helping anyone who stumbles upon this...

I tried this method of installation, but got a core dump somewhere in the font initialisation process -- the stacktrace ended at sun.font.FontConfigManager.getFontConfig at least. I had various font packages installed, but none of them included Lucida Console, which based on the source code is I think MapTool's default font.

I had to track down the lucida ttf files and install them (copying to ~/.local/share/fonts is one way, more here: https://askubuntu.com/questions/3697/ho ... tall-fonts).

Having the font available on my Linux system made it work. Hope this helps anyone else with the same problem.
This saved my bacon today. Thank you!

Re: quick fix for running on Linux when jar doesn't work

Posted: Wed Jun 24, 2020 8:05 pm
by Merudo
Thank you for sharing the workaround!

If you could post the full error stack, it could help us figure out what is wrong and fix the issue in a new version.

Re: quick fix for running on Linux when jar doesn't work

Posted: Sat Jun 27, 2020 3:01 pm
by woat
Merudo wrote:
Wed Jun 24, 2020 8:05 pm
Thank you for sharing the workaround!

If you could post the full error stack, it could help us figure out what is wrong and fix the issue in a new version.
I would love to but now I can't reproduce the problem. I even tried a fresh Linux install but it worked this time without copying the fonts to ~/.local/share/fonts. :?:

I guess the good news is people can continue to extract the deb to run Maptool. If it fails to launch they can try copying the fonts from .../MapTool/runtime/lib/fonts to their ~/.local/share/fonts.

Re: quick fix for running on Linux when jar doesn't work

Posted: Tue Jul 07, 2020 4:03 pm
by woat
I just figured out why sometimes I can get Maptools to run from an extracted deb and other times it fails. It's a weird bug.

If I run MapTool from '/home/$USER/Bin/MapTool' it runs but '/home/$USER/bin/MapTool' it fails with this error.
Error: could not find libjava.so
Error: Could not find Java SE Runtime Environment.
I don't know why having a lowercase 'bin' folder breaks it. At least on Manjaro Linux.

Re: quick fix for running on Linux when jar doesn't work

Posted: Tue Jul 07, 2020 5:46 pm
by taustinoc
Linux, like all Unix and BSD derived operating systems, is case sensitive in the file system. In Windows, "B" and "b" are the same, so far as Windows is concerned. But in *nix, they are different characters. What you observe is precisely what I'd expect (assuming the folder is named "Bin" and not "bin").

Re: quick fix for running on Linux when jar doesn't work

Posted: Mon Jul 13, 2020 2:26 am
by woat
But why does Maptool care if my ~/bin is lowercase or not? I've run a lot of binaries from ~/bin without having this issue before.

edit: Here's the bug in action
https://webm.red/PqZE.webm