You are not logged in.

#1 2012-12-29 18:53:30

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 186

[Solved] Eclim + lwjgl: Unsatisfied Link Error (but works in Eclipse)

I'm trying to get started with OpenGL and Java. I set up Eclim to work with Vim and installed lwjgl from the AUR. I modified my Eclipse project .classpath to reflect the lwjgl libraries, and yet when I run a test program from Vim (Eclim), I get the classic UnsatisfiedLinkError. Opening the project in Eclipse and running it works fine.

I've created a video to help show this: http://www.youtube.com/watch?v=iNC77Nzm … e=youtu.be

Last edited by Mindstormscreator (2012-12-30 04:04:37)

Offline

#2 2012-12-29 22:17:30

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 186

Re: [Solved] Eclim + lwjgl: Unsatisfied Link Error (but works in Eclipse)

Update: I've discovered that Eclipse executes my test program like this:

-Djava.library.path=/usr/share/lwjgl/native/linux -classpath /home/alex/code/java/OpenGL/bin:/usr/share/lwjgl/jar/lwjgl.jar Test

I have a feeling that eclim isn't adding the "-Djava.library.path=/usr/share/lwjgl/native/linux" part. What's the best way to inform Eclim to pass this to the Java vm? Is there a way I can supply it to the :Java vim command?

By the way, here's my .classpath:

<?xml version="1.0" encoding="UTF-8"?>
<classpath>
	<classpathentry kind="src" path="src"/>
	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
	<classpathentry kind="lib" path="/usr/share/lwjgl/jar/lwjgl.jar">
		<attributes>
			<attribute name="org.eclipse.jdt.launching.CLASSPATH_ATTR_LIBRARY_PATH_ENTRY" value="/usr/share/lwjgl/native/linux"/>
		</attributes>
	</classpathentry>
	<classpathentry kind="output" path="bin"/>
</classpath>

Offline

#3 2012-12-30 04:04:06

Mindstormscreator
Member
Registered: 2012-07-01
Posts: 186

Re: [Solved] Eclim + lwjgl: Unsatisfied Link Error (but works in Eclipse)

Fixed it. It's an Eclim setting.

:EclimSettings
zR (to unfold the settings)

find org.eclim.java.run.jvmargs and add inside [ ]:

"-Djava.library.path=/usr/share/lwjgl/native/linux"

Offline

Board footer

Powered by FluxBB