Ep. 1: Setup - Let's Make Flappy Bird
Why Stack Overflow recommends it
Stack Overflow users link it as the tutorial they were following when they hit LWJGL setup errors such as the macOS -XstartOnFirstThread exception and NoClassDefFoundError.
Recommended by 1 people across 1 different months, 2015 to 2023.
What it is
The first episode of The Cherno's series on building a Flappy Bird clone from scratch in Java with LWJGL and modern OpenGL. It covers installing the JDK, Eclipse and LWJGL and setting up the project, and it assumes the viewer already knows some Java and OpenGL.
What people said
Recommends Vi Pie · 2015-08 · Stack Overflow · on “Exception in thread "Game" java.lang.IllegalStateException: Please run the JVM with -XstartOnFirstThread”
I'am a beginner programmer and I'm trying to learn LWJGL following. I got stuck with this tutorial [this video] about reproducing Flappy Birds with LWJGL, the same of the guy who asked this question [LINK] . I'm using Eclipse on a MacBook Pro Retina. The problem is this Exception in thread "Game" java.lang.IllegalStateException: Please run the JVM with -XstartOnFirstThread. at org.lwjgl.system.macosx.EventLoop.checkFirstThread(EventLoop.java:20) at org.lwjgl.glfw.GLFW.glfwInit(GLFW.java:428) at com.cherno.flappy.Main.init(Main.java:41) at com.cherno.flappy.Main.run(Main.java:65) at java.lang.Thread.run(Thread.java:745) Given by this code: package com.cherno.flappy; import static org.lwjgl.glfw.GL
Cites MjlDoesProgramming · 2015-04 · Stack Overflow · on “Eclipse : Exception in thread "Game" java.lang.IllegalStateException: Please run the JVM with -XstartOnFirstThread”
I am taking a tutorial [this video] on how to make flappy bird on eclipse (java). I followed all the instructions on this video, but it says this error : Exception in thread "Game" java.lang.IllegalStateException: Please run the JVM with -XstartOnFirstThread. at org.lwjgl.system.macosx.EventLoop.checkFirstThread(EventLoop.java:20) at org.lwjgl.glfw.GLFW.glfwInit(GLFW.java:426) at com.thecherno.flappy.Main.init(Main.java:37) at com.thecherno.flappy.Main.run(Main.java:79) at java.lang.Thread.run(Thread.java:745) The file location is correct, but there was the error. Here is the Main class code : package com.thecherno.flappy; import static org.lwjgl.glfw.GLFW.*; import static org.lwjgl.opengl.GL11.*
Cites xraise17 · 2023-02 · Stack Overflow · on “How do I fix java.lang.NoClassDefFoundError: org/lwjgl/LWJGLException ? (Eclipse - lwjgl)”
Background/Prerequisites I am trying to follow a game tutorial(to create flappy bird). In the Episode - 2 it creates an empty window and I get an error. I tried following this tutorial series to create a game using java - eclipse - lwjgl. [this video] Flappy Bird - Episode 1 [this video] I have installed java jdk 17.0.6 (in the tutorial it installs an older version which I thought it won't be a problem, let me know if this could be the cause), eclipse 2022 and lwjgl - 2.9.1. I have copied the code from Episode 2 (seen below): [LINK] Flappy Bird - Episode 2 [LINK] which tries to create an empty window. package com.chris.flappy; import org.lwjgl.LWJGLException; import org.lwjgl.opengl.Display; import or