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

Thoughts, Help, Feature Requests, Bug Reports, Developing code for...

Moderators: Azhrei, dorpond, trevor

Forum rules
PLEASE don't post images of your entire desktop, attach entire campaign files when only a single file is needed, or generally act in some other anti-social behavior. :)
Post Reply
woat
Kobold
Posts: 6
Joined: Thu Mar 05, 2020 11:24 pm

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

Post 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

~ash
Kobold
Posts: 1
Joined: Tue Apr 28, 2020 10:36 pm

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

Post 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.

woat
Kobold
Posts: 6
Joined: Thu Mar 05, 2020 11:24 pm

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

Post 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.

woat
Kobold
Posts: 6
Joined: Thu Mar 05, 2020 11:24 pm

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

Post 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!

Merudo
Giant
Posts: 228
Joined: Wed Jun 05, 2019 7:06 am

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

Post 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.

woat
Kobold
Posts: 6
Joined: Thu Mar 05, 2020 11:24 pm

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

Post 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.

woat
Kobold
Posts: 6
Joined: Thu Mar 05, 2020 11:24 pm

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

Post 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.

taustinoc
Dragon
Posts: 429
Joined: Mon Aug 03, 2015 6:30 pm

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

Post 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").

Post Reply

Return to “MapTool”