Jump to content


Recommended Posts

Is there anything special about Mandriva's implementation of ld_library_path? Is it handled differently by different distros?

I'm trying to follow Sun's instructions for installing java3d, and there are basically two ways of doing it. Method 1 is to take the jars and copy them to jre/lib/ext/ and take the .so files and copy them to jre/lib/i386/ and this then works. But this isn't the recommended way. In the instructions they say you shouldn't do it this way, you should copy these files outside the jre and then reference them using system variables:

Modify your CLASSPATH environment variable to include the full paths to j3dcore.jar, j3dutils.jar, and vecmath.jar. For example:

export CLASSPATH=.:/myhome/j3d/lib/ext/j3dcore.jar:/myhome/j3d/lib/ext/j3dutils.jar:/myhome/j3d/lib/ext/vecmath.jar


Modify your LD_LIBRARY_PATH environment variable to contain the full path to the lib/<ARCH> directory. For example, on 32-bit Linux:

export LD_LIBRARY_PATH=/myhome/j3d/lib/i386

When I try this, using Sun's 1.6 jre from the repositories, it just doesn't work, so I'm wondering either it's not finding the classes (not likely) or it's not finding the shared objects using this library path. I thought maybe this was a Mandriva thing but I also tried it on Debian Etch also with Sun's jre 1.6 and that also failed to work. Copying the files inside the jre directory then works.

Any ideas why? Is it just a simple gotcha?

(By the way I used ~/j3d as my directory, and tried both relative paths (j3d) and absolute paths (/home/user/j3d) and checked for typos I also tried piling everything into the command line as java -cp list:of:jars -Djava.library.path=directory ... but that also didn't work)

Link to comment
Share on other sites

Thanks, I'll have to try that later. But the disadvantage is that one would need root permissions for this, to set that up for the whole system. The recommended way (which doesn't work for me) just sets an environment variable so should work for anybody. In this example the path I want to add is inside my ~/ so it wouldn't make sense to include it in the path for the other users of the system who can't access this directory.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Create New...