In the drop down list, pick your new java-7-oracle JRE environment. Now that we’ve added the javaws.jar to the new java-7-oracle JRE, click ok all the way out until we’re back at the Add Library screen. This is located on my machine at /usr/lib/jvm/java-7-oracle/jre/lib Navigate to your javaws.jar inside your java-7-oracle install.
STBIMAGE IMAGE EXAMPLE JAVA LWJGL INSTALL
Now for JRE Home, navigate to your java 7 oracle install path, and the name should fill in. Pick the Alternate JRE radio button, and click on the Installed JREs… button next to it. Oh, and before we go to the Libraries tab, make sure you set up the native library location correctly: it should point to breakout/target/natives then click on the Libraries tab.įrom there click Add Library… And pick JRE System Library and click Next. First, let’s add the oracle java 7 JRE to our project as it’s primary library. Now we need to modify the pom.xml file to understand our dependencies and build process.Īt this point our pom.xml file is set up, but the things we depend on aren’t all in place. I put my code into /home/midas/git/breakout-lwjglĪnd this gives us a new blank Maven project. Once m2e is installed, you’ll need to restart Eclipse, and then we can create a new maven project. Once Eclipse is installed, open it up and we’ll need to install Maven for Eclipse, or the m2e plugin. I personally put my Eclipse into /opt/eclipse/ and run it from there using /opt/eclipse/eclipse Download the correct version from here (Mine was Linux 64-bit) and install it. Now that our java is set up, let’s get the latest Eclipse. Once that’s completed you should set your $JAVA_HOME variable to your oracle directory.Įxport JAVA_HOME='/usr/lib/jvm/java-7-oracle/' Sudo apt-get install openjdk-7-jdk openjdk-7-jre maven oracle-java7-installer git Sudo apt-add-repository ppa:webupd8team/java Let’s add the oracle java installer repo from WebUpd8 so we can do this all at once. We will be using LWJGL and some dependencies like Slick2D and Java3D vecmath. I am currently running Ubuntu 12.04.3 LTS, and I’m going to set up my environment in Eclipse Kepler. So here are the steps from going from nothing to a working LWJGL 2D game environment. Luckily, now that I’ve done it once, I can do it again, and much more concisely. If you’d like to read of my trials, check out the posts, starting from here. Since it took me almost 2 weeks and 3 posts to figure out, I clearly made some mistakes along the way.
STBIMAGE IMAGE EXAMPLE JAVA LWJGL HOW TO
I stream-of-consciousness documented my unnecessarily complex journey through figuring out how to set up LWJGL enough to draw images on the screen.