Welcome, Guest. Please login or register.

Login with username, password and session length

 
Advanced search

11991 Posts in 1587 Topics- by 3508 Members - Latest Member: NevilleKemp

26. May 2012, 03:10:57 pm
Xith3D CommunityGeneral CategorySupport (Moderator: Marvin Fröhlich)no LWJGL in java.library.path + General NetBeans Setup
Pages: [1]
Print
Author Topic: no LWJGL in java.library.path + General NetBeans Setup  (Read 1925 times)
Bogue Magnus
Just dropped in

Offline Offline

Posts: 5


View Profile Email
« on: 07. September 2010, 05:11:06 pm »

Xith3D Version: 9.7 Build 1829 (I thought that it was 1831, but the Version.txt file in my Xith3D folder says 1829.)
IDE: NetBeans 6.9.1
OS: Windows XP
JDK (probably irrelevant): Sun 1.6U21

My problem is that when I try to run any Xith3D projects or example code, I get the said 'no LWJGL in java.library.path' error. I personally have tried to work it out for a few days now, but with no result.

Now, I am a fairly unexpected programmer. The only thing that I have successfully used before is the normal JDK and the Java3D API. As of now, the only thing that I have done with Java programming at all is gone through various tutorials that have taught me the basics of things. After exploring my options more fully, I have decided that I would like to use Xith3D for other programs and projects that I would like to fulfill.

So, if you could help me successfully setup my IDE for this, that would be greatly appreciated. Currently, I have placed in the 'Libraries' tab (not sure what it is called) all of the JAR files that came with my download, including those that are within the 'Third Party' folder, including the three LWJGL files. When I did that, it certainly did help (seeing as I went from all errors to no errors, except at runtime), so I really thought that I had everything correctly done, but alas, the true solution has evaded me.


Code:
Exception in thread "main" java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path
        at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1689)
        at java.lang.Runtime.loadLibrary0(Runtime.java:823)
        at java.lang.System.loadLibrary(System.java:1028)
        at org.lwjgl.Sys$1.run(Sys.java:72)
        at java.security.AccessController.doPrivileged(Native Method)
        at org.lwjgl.Sys.doLoadLibrary(Sys.java:65)
        at org.lwjgl.Sys.loadLibrary(Sys.java:81)
        at org.lwjgl.Sys.<clinit>(Sys.java:98)
        at org.lwjgl.opengl.Display.<clinit>(Display.java:128)
        at org.xith3d.render.lwjgl.DisplayModeSelectorNativeImpl.getAvailableModes(DisplayModeSelectorNativeImpl.java:71)
        at org.xith3d.render.config.DisplayModeSelector.getBestMode(DisplayModeSelector.java:134)
        at org.xith3d.render.Canvas3DFactory.createDisplayMode(Canvas3DFactory.java:57)
        at org.xith3d.render.Canvas3DFactory.createDisplayMode(Canvas3DFactory.java:70)
        at org.xith3d.render.Canvas3DFactory.create(Canvas3DFactory.java:478)
        at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:772)
        at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:884)
        at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:936)
        at org.xith3d.render.Canvas3DFactory.createWindowed(Canvas3DFactory.java:961)
        at org.xith3d.xin.Chapter01a.<init>(Chapter01a.java:52)
        at org.xith3d.xin.Chapter01a.main(Chapter01a.java:66)
Java Result: 1
Logged
badboyboogey
Enjoying the stay
*
Offline Offline

Posts: 40



View Profile
« Reply #1 on: 07. September 2010, 07:39:08 pm »

I used to have problems at first with netbeans.
Now I stick to this formula and it works every time...

First go to Tools>Libraries and create a new Library called xith3d (or whatever you want to call it)
then add all the jar files from the third party folder, see pic below.


Then create another library called xith.natives and add the four foolders shown below...


(the above two libraries come ready made with xithtk but they are not global and I don't know how to make them so, so I remake them)

then add these two librarys to any project you wish to use xith3d in..   Project Properties>>Libraries>>Add Library

finally while still in project properties click on run menu to the left 
(This is the bit you are missing to give you the above error, change memory bits to what you need)
 add the following line to VM Options
-Djava.library.path="${libs.xith3d.natives.classpath}"  -Xms512m -Xmx1024m -Djava.security.policy=applet.policy



hope that helps you... and anyone else Wink

Edit: welcome to Xith3d, if you have any further questions just ask, i'm always here a few times a week but rarely announce my presence Wink
« Last Edit: 07. September 2010, 07:45:02 pm by badboyboogey » Logged
Agrv
Administrator
Enjoying the stay
*****
Offline Offline

Posts: 64


View Profile
« Reply #2 on: 07. September 2010, 08:13:46 pm »

Xith3D Version: 9.7 Build 1829 (I thought that it was 1831, but the Version.txt file in my Xith3D folder says 1829.)

The only difference between 1829 and 1831 is that 1829 was missing the jinput.jar in the classpath of the testlauncher.bat, so I uploaded 1831 a few hours after 1829.

As for your problem it is clearly a native library issue; they are missing in your java.library.path. Sadly I know nothing of Netbeans (I use Eclipse) but badboyboogey's advices should help you.
Logged
Bogue Magnus
Just dropped in

Offline Offline

Posts: 5


View Profile Email
« Reply #3 on: 08. September 2010, 03:00:36 am »

Ah, I'm sure that that is the problem. However, after trying to fix it according to what you have shown me, I have found that literally none of my downloads have those Native files in them. I've downloaded various builds, and now the current one, and I find it interesting that some of the file sizes (of the same exact file) are different. But, the reason for this would be my poor internet connection. I'll simply go get on a different network tomorrow and download the complete file from there and transfer it to my home computer then.

Thank you so much for your help, it is truly appreciated  Cheesy.
Logged
Agrv
Administrator
Enjoying the stay
*****
Offline Offline

Posts: 64


View Profile
« Reply #4 on: 08. September 2010, 05:46:46 am »

That sounds strange. When a zip archive extracts fine, it usually means that it is not corrupted. To be sure, after extraction just run the testlauncher.bat; if you can run the tests then you have all the required native files. In this case you can take a look at the java command line of the testlauncher.bat to see how it should look like.
Logged
badboyboogey
Enjoying the stay
*
Offline Offline

Posts: 40



View Profile
« Reply #5 on: 08. September 2010, 06:22:43 pm »

there is one other thing.. do you use the subversion thats built into netbeans?
I don't anymore coz it was a pain in the proverbial arse!, used to end up with conflicts and missing files nearly everytime  I updated xith.
I now use tortoise svn.... absolutely top program! no problems.
Logged
Bogue Magnus
Just dropped in

Offline Offline

Posts: 5


View Profile Email
« Reply #6 on: 08. September 2010, 07:00:31 pm »

Quote
That sounds strange. When a zip archive extracts fine, it usually means that it is not corrupted.

Yeah, that's what I thought too. But it seems as if I was correct seeing as, after I downloaded it from a different location, the testlauncher is working fine now.

Quote
do you use the subversion thats built into netbeans?

Nope, I've never messed with it.

~~

Now, I got a bit worried when it was still giving me that same error. But I figured out that it was a simple capitalization difference between our 'xith3d.natives' folders and was able to simply correct it. So, everything is working correctly now and I'm quite pleased.

Thank you again Smiley.
Logged
Pages: [1]
Print
Jump to:  

Theme orange-lt created by panic