LWJGL / lwjgl3

LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.
https://www.lwjgl.org
BSD 3-Clause "New" or "Revised" License
4.77k stars 635 forks source link

Running LWJGL 3.3.0 Scala app via sbt run more than once fails #701

Open JackiBackiBoy opened 2 years ago

JackiBackiBoy commented 2 years ago

Version

3.3.0 (nightly)

Platform

Linux x64, Linux arm64, Linux arm32, macOS x64, macOS arm64, Windows x64, Windows x86, Windows arm64

JDK

Java 16.0.2

Module

LWJGL core

Bug description

When running a Scala application with sbt run command the program runs fine the first time sbt run is called. However when an application is closed and then run again it fails. The error messages vary but the most common error messages related to no class definition being found or that a certain .dll or .so file is already loaded in another classloader.

Stacktrace or crash log output

[error] (run-main-1) java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.glfw.GLFW [error] java.lang.NoClassDefFoundError: Could not initialize class org.lwjgl.glfw.GLFW
Spasi commented 2 years ago

Hey @JackiBackiBoy,

I'm not experienced in Scala/sbt, so I'll need an MCVE to be able to help. Preferably in the form of a small github repo that I could clone and build/run easily.