Classpath, DLL's, Windows

Hello,

I am trying to do some development with the Java3D JDK for Windows.

This JDK has several DLLs.

My question is:
How do I put these in my classpath?

If I only put the Java3D jar's in my class path, I get the following
message:

java.lang.UnsatisfiedLinkError: no J3D in java.library.path

If I go into ProjectProperties Run/Debug Configurations and set the Working
directory for my app to be the 3D JDK's bin dir ( C:\j3d_jdk\jre\bin ), the
dll's are found and my app will run.

But I don't want to have to set the working directory for each app to be the
JDK's bin dir.

So how do I tell IntelliJ to look in the bin dir. I don't see any way to add
this to the classpath.

If I just add the path by itself ( C:\j3d_jdk\jre\bin ), to the classpath, I
get the unsatisfied link error.
If I try adding the dll's directly, as you would do for jar files, IntelliJ
flags this as an error.

Thanks for any help,

Ted Hill


2 comments
Comment actions Permalink

did you try the General tab for project properties under classpath tab? You can also add it to your library in the same tab.

0
Comment actions Permalink

dlls should be put in the java library path, which isn't the same
as the classpath. If I'm not mistaken on windows by default this
consists of the bin directory of the jdk your using, the working
directory and the system path. You can change this easily by using
-Djava.library.path=]]>. Or you can put the j3d dlls in a
directory in the default library path.
Coming back to how to configure Idea to do this, you would have to add
the -D... stuff for each run entry by hand I'm afraid. As far as I know
there's no way to set system properties on a project level.

Pepijn Van Eeckhoudt

Ted Hill wrote:

Hello,

I am trying to do some development with the Java3D JDK for Windows.

This JDK has several DLLs.

My question is:
How do I put these in my classpath?

If I only put the Java3D jar's in my class path, I get the following
message:

java.lang.UnsatisfiedLinkError: no J3D in java.library.path

If I go into ProjectProperties Run/Debug Configurations and set the Working
directory for my app to be the 3D JDK's bin dir ( C:\j3d_jdk\jre\bin ), the
dll's are found and my app will run.

But I don't want to have to set the working directory for each app to be the
JDK's bin dir.

So how do I tell IntelliJ to look in the bin dir. I don't see any way to add
this to the classpath.

If I just add the path by itself ( C:\j3d_jdk\jre\bin ), to the classpath, I
get the unsatisfied link error.
If I try adding the dll's directly, as you would do for jar files, IntelliJ
flags this as an error.

Thanks for any help,

Ted Hill


0

Please sign in to leave a comment.