Java application just does not want to work


#1

Hi. I have an java application that uses bundled java to launch jar, The UI elements are in JavaFX. I managed to make it “sorta” run (not throw java errors). But right now i am facing an issue i cannot get over. I get error:

normaluser@redacted:~/Desktop/x64$ snap run dirtlauncher
libGL error: MESA-LOADER: failed to open vmwgfx (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: vmwgfx
libGL error: MESA-LOADER: failed to open vmwgfx (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: vmwgfx
libGL error: MESA-LOADER: failed to open swrast (search paths /usr/lib/x86_64-linux-gnu/dri:$${ORIGIN}/dri:/usr/lib/dri)
libGL error: failed to load driver: swrast
X Error: GLXBadContext
Request Major code 153 (GLX)
Request Minor code 6 ()
Error Serial #44
Current Serial #43

I use bundled shellscript as sort of launcher and to set up few things. But for the love of the god i cannot make it run. In this specific instance: On VMWare machine, but the same thing goes for my thinkpad, just throws an error about other i935 instead of vmwgfx.
Somebody please help. I am literally out of ideas how to make it run.


#2

Thats my snapcraft.yml:

name: dirtlauncher
version: 1.1.0
summary: DirtCraft MineCraft Launcher
description: |
  Launches minecraft and makes it easier to install modpacks that are available for playing on the
  dirtcraft server network, which can be access with the following ip address: "Dirtcraft.GG"
confinement: strict
base: core18

parts:
  launch-dirtlauncher:
    plugin: dump
    source: DirtCraft
    stage-packages: [libx11-6, openjfx, mesa-utils, libgl1-mesa-glx, libgl1-mesa-dri, mesa-utils-extra, mesa-vdpau-drivers, mesa-vulkan-drivers, mesa-va-drivers, libglw1-mesa-dev]

apps:
  dirtlauncher:
    plugs: [config-java, desktop, unity7, opengl, network, network-bind, pulseaudio, joystick]
    command: DirtLauncher/run.sh

#3

if you ship the mesa drivers inside your snap, you should point the LIBGL_DRIVERS_PATH variable to $SNAP/usr/lib/$SNAPCRAFT_ARCH_TRIPLET/dri via an environment entry in your dirtlauncher: apps: block.


#4

I have running an .sh script. Can i just put it there?

Edit. I added this line into the .sh file. It works. I am dumb. Thanks