Closed gamer9-create closed 2 years ago
It was not working because of ImGui.createContext().
Which steps do you do to start the example? I believe you've did it from the IDEA. When doing that you need to provide a path to the native binaries as it's said in the readme. If you will start it with the gradle command, everything should work.
I recently was trying out one of the ImGui glfw examples, however, I got hit by and error message saying this:
"C:\Program Files\Java\jdk-16.0.1\bin\java.exe" "-javaagent:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\lib\idea_rt.jar=52283:C:\Program Files\JetBrains\IntelliJ IDEA Community Edition 2021.1.2\bin" -Dfile.encoding=UTF-8 -classpath "C:\Users\UserName\Documents\LWJGL3 Engine\out\production\LWJGL3 Engine;C:\Users\UserName\Documents\LWJGL3 Engine\lib\imgui\imgui-binding-1.84.1.4.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\imgui\imgui-lwjgl3-1.84.1.4.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\joml-1.10.1.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-glfw.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-glfw-natives-windows.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-nanovg.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-nanovg-natives-windows.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-natives-windows.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-openal.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-openal-natives-windows.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-opengl.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-opengl-natives-windows.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-par.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-par-natives-windows.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-stb.jar;C:\Users\UserName\Documents\LWJGL3 Engine\lib\lwjgl3\lwjgl-stb-natives-windows.jar" game.ImGuiGlfwExample Exception in thread "main" java.lang.UnsatisfiedLinkError: no imgui-java64 in java.library.path: C:\Program Files\Java\jdk-16.0.1\bin;C:\WINDOWS\Sun\Java\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\Program Files\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Perl64\site\bin;C:\Perl64\bin;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files\Intel\WiFi\bin\;C:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files (x86)\Sennheiser\SenncomSDK\;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files\dotnet\;C:\Program Files\Git\cmd;C:\MinGW\bin;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Users\UserName\AppData\Local\Programs\Python\Python39\Scripts\;C:\Users\UserName\AppData\Local\Programs\Python\Python39\;C:\Users\UserName\AppData\Local\Microsoft\WindowsApps;C:\Program Files\JetBrains\PyCharm Community Edition 2021.1.2\bin;C:\Users\UserName.dotnet\tools;C:\Users\UserName\AppData\Local\Programs\Microsoft VS Code\bin;. at java.base/java.lang.ClassLoader.loadLibrary(ClassLoader.java:2423) at java.base/java.lang.Runtime.loadLibrary0(Runtime.java:808) at java.base/java.lang.System.loadLibrary(System.java:1893) at imgui.ImGui.(ImGui.java:57)
at game.ImGuiGlfwExample.initImGui(ImGuiGlfwExample.java:140) - (THIS IS WHERE THE ERROR HAPPENED)
at game.ImGuiGlfwExample.run(ImGuiGlfwExample.java:78)
at game.ImGuiGlfwExample.main(ImGuiGlfwExample.java:501)
I'm not sure if this is just me or I installed the library incorrectly, but I would like to report this bug in case.
Thanks!