Sign in to follow this  
pinacolada

[java] using a library in IntelliJ

Recommended Posts

Hey I just recently picked up IntelliJ (version 6.0.1) and I'm still trying to figure out the "proper" way to do things. Right now I have a problem, I have a project trying to include a library (specifically the LWJGL library). I was able to successfully include it under Project Libraries, and everything compiles fine. However it fails to run, java tells me "java.lang.UnsatisfiedLinkError: no lwjgl in java.library.path" So I guess question 1 is, why wouldn't the IDE include my libraries in the classpath for me? Anyway I tried to add my libraries manually by adding: -classpath "\libraries" to the VM parameters field in the Run.. dialog. But this seems to have a bad effect on the rest of the command line options, because then I get an error: "java.lang.NoClassDefFoundError: com/intellij/rt/execution/application/AppMain" I guess an alternative solution is to add a "run" target to Ant and use that (I'm pretty sure I can figure out how to correctly set the classpath in Ant).. but am I right in assuming that if I execute the project straight from Ant, that I won't be able to use all the fancy debugging options (like step-through and all that)? Thanks!

Share this post


Link to post
Share on other sites
oops! Never mind. I seem to have misunderstood the error I was getting. It wasn't because my classpath was wrong, but actually b/c I needed to set another property (as per the FAQ I found here http://lwjgl.org/faq.php ).

I would delete this thread but I can't. Oh well!

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this