LWJGL Display class can't be found

后端 未结 2 2058
执念已碎
执念已碎 2021-01-12 14:48

I have installed LWJGL into a Java project, and I can\'t import the Display class.

import org.lwjgl.opengl.display;

Gives a cannot be resol

2条回答
  •  被撕碎了的回忆
    2021-01-12 15:17

    1. Create a folder named lwjgl in your project folder
    2. Copy lwjgl.jar, lwjgl_util.jar and slick-util.jar into that folder
    3. Select all three files in that folder and right click them
    4. Select Build-Path --> Add to Build Path
    5. Check if your project now contains the classes you need...

    In case you can't start your program, then set the path to natives folder... https://stackoverflow.com/a/27433775/3615725

    Also it should be imported as import org.lwjgl.opengl.Display;

    EDIT: For LWJGL 3 try this http://www.lwjgl.org/guide

提交回复
热议问题