[java] can't run gl4java applet

Started by
2 comments, last by fenghus 22 years, 6 months ago
Hi! I can''t seem to run my compiled java applet somehow. All demos on the gl4java website work great, but if i compile a gl4java applet and try to run it i get: Sorry, can''t find the library: GL4JavaJauGljJNI13 java.lang.UnsatisfiedLinkError: C:\WINDOWS\SYSTEM\GL4JavaJauGljJNI13.dll: Det gÕ r inte att hitta en DLL-fil som beh÷vs f÷r att k÷ra programmet (The last line is swedish for "Can''t find a dll file needed to run the program") There IS a file named C:\WINDOWS\SYSTEM\GL4JavaJauGljJNI13.dll and I have the same problem on another w2k computer, so i''m pretty sure the file exists in the correct place... Pointers, anyone? --Michael
Advertisement
How do you run your program and where have you placed the gl4java DLLs? I had the same problem with an application that I had created. It had to do with file paths and which java.exe instance that was being called to run the program.

The java developers kit usually comes with 2 java.exe instances, one in the jdk1.3\bin directory and the other in the jdk1.3\jre\bin directory. You can try the different java.exe instances by typing out the full name of the java instance. Instead of just running your program using the command "java YourClass", type "c:\jdk1.3\bin\java YourClass" or "c:\jdk1.3\jre\bin YourClass" (you may have something else than just "c:\" before the jdk1.3 directory, depending on your installation). You might also want to try to point the file path to ''the other'' bin directory, and try copying the DLLs to both bin directories. Not sure if this helps though since you are dealing with applets rather than applications. Good luck!

Henry
Here''s what Sun says about how dlls are found in Win32:

Win32:
The Win32 VM uses a search path that includes the current directory for the process or one of the directories listed in the PATH environment variable.

So make sure C:\windows\system\ is in your PATH environment variable, or try putting the dll in C:\windows\system32\.


"If consquences dictate our course of action, it doesn''t matter what''s right, it''s only wrong if you get caught."
- Tool

"There is no reason good should not triumph at least as often as evil. The triumph of anything is a matter of organization. If there are such things as angels, I hope that they're organized along the lines of the mafia." -Kurt Vonnegut

Thanks!

That did it. I explicitly set the path for the java.exe in JCreator to c:\jdk1.4\jre\bin\java.exe and now it works.

--Michael

This topic is closed to new replies.

Advertisement