Compiling and running a LWJGL Project [solved]

Very simply, how can this be done?
I do not mind if I have to write a complicated batch file.
I have been trying to do this for a while and it is very confusing. For example, how can I edit a manifest file in eclipse? What exactly do I have to do?

I can’t use JarSplice in it’s current state because it won’t let me take input from the command line.

I am using 3 Jars in my library: lwjgl_util.jar, lwjgl.jar, slick.jar

How exactly can I run my project outside of my IDE in cmd?


This is how I do it:
-export runnable .jar file with libraries inside the jar
-put native files near the jar file and load them from inside the .jar file.

public class Natives {

	public static void load() {
		String system = System.getProperty("");
		String path = null;
		path = new File("nat").getAbsolutePath();

		if(path == null) {
			System.out.println("Couldn't load natives!");

		path += "\\";
		if (system.contains("Windows")) {
		    System.setProperty("org.lwjgl.librarypath", path + "Windows");
		else if (system.contains("Mac")) {
		    System.setProperty("org.lwjgl.librarypath", path + "Mac");
		else if (system.contains("Linux")) {
		    System.setProperty("org.lwjgl.librarypath", path + "Linux");


So basically just to make something clear.
You need to have your natives setup like this

My Folder (Folder)
	- myjarfile.jar (.jar File)
	- nat (Folder)
		- Windows (Folder)
			- your windows native files here (File)
		- Mac (Folder)
			- your mac native files here (File)
		- Linux (Folder)
			- your linux native files here (File)

You are a saint! Thank you so much!

For those of you who read this later, do what he said and put your natives in the folder “Windows” (for example) which is in the folder “nat” which is in the same folder as your JAR

Glad to help ! :slight_smile: