Publishing an LWJGL Project with Eclipse

Started by WillSmith190, December 31, 2010, 02:14:57

Previous topic - Next topic

WillSmith190

I made a project in Eclipse (a small one) and I want to show it to some of my friends, but they don't have Eclipse and I just want to give them a simple JAR or EXE file. I export my JAR as a Runnable Jar, but it gives me 3 options. Put the reguired libraries (the LWJGL ones) in the JAR, in the folder that has the JAR, or extract reguired libraries into generated JARs. Non of these work. When I start the JAR it loads and nothing happens, so I'm pretty sure it probably isn't loading the library... Can anyone help me? You may think this isn't really a LWJGL question, but I didn't have this issue with other libraries (or maybe I've been using them all wrong and this is the only noticable one).

If you can help me, thanks   :)

Torradin

Oh, well thats because Jars don't run standalone, even with the libraries. You either need to convert it to an exe, or a JNLP. Your best option is the JNLP (Java Webstart file). Look that up on google, and you'll find many tutorials on how to set up a Jar as a Java WebStart.

WillSmith190

Quote from: Torradin on December 31, 2010, 16:06:17
Oh, well thats because Jars don't run standalone, even with the libraries. You either need to convert it to an exe, or a JNLP. Your best option is the JNLP (Java Webstart file). Look that up on google, and you'll find many tutorials on how to set up a Jar as a Java WebStart.

Ok, I'll look that up

EDIT:

I made a JNLP, but now it can't find LWJGL... same thing happens with the demos on the LWJGL website... so did I install JWLGL wrong? And if its something that needs to be installed, won't my friends have to install it too?

java.lang.reflect.InvocationTargetException
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
	at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
	at java.lang.reflect.Method.invoke(Unknown Source)
	at com.sun.javaws.Launcher.executeApplication(Unknown Source)
	at com.sun.javaws.Launcher.executeMainClass(Unknown Source)
	at com.sun.javaws.Launcher.doLaunchApp(Unknown Source)
	at com.sun.javaws.Launcher.run(Unknown Source)
	at java.lang.Thread.run(Unknown Source)
Caused by: java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
	at java.lang.ClassLoader.loadLibrary(Unknown Source)
	at java.lang.Runtime.loadLibrary0(Unknown Source)
	at java.lang.System.loadLibrary(Unknown Source)
	at org.lwjgl.Sys$1.run(Sys.java:73)
	at java.security.AccessController.doPrivileged(Native Method)
	at org.lwjgl.Sys.doLoadLibrary(Sys.java:66)
	at org.lwjgl.Sys.loadLibrary(Sys.java:82)
	at org.lwjgl.Sys.<clinit>(Sys.java:99)
	at org.lwjgl.opengl.Display.<clinit>(Display.java:130)
	at LWJGLTestApplet.switchMode(LWJGLTestApplet.java:266)
	at LWJGLTestApplet.init(LWJGLTestApplet.java:233)
	at LWJGLTestApplet.execute(LWJGLTestApplet.java:57)
	at LWJGLTestApplet.main(LWJGLTestApplet.java:460)
	... 9 more


EDIT II:

I tried using <nativelib href="..."/> to add the LWJGL libs, and I set security to all-permissions, but now it says it wont run because my JAR is unsigned. How do I sign it?