another "no jogl in java.library.path" problem - APPLET

hi!

First, I want to stress, that I am trying to create APPLET, so I can`t manually copy libraries or set path variable.

I have searching for that solution on web and forums, but havent found anything.

I have all of JSR-231 beta 03 jar files, like jogl and all natives jars on my server and I am using JOGLAppletLauncher to lauch my applet. Everything works fine on my pc, beucase i have jogl.dll in my library path, but none of my friends have that file, only pure j2re. So what i need to do, to make this applet to run properly? Why this applet dont use dll`s from jogl-natives-win32.jar file?

My friends whos trying to test my applet, have this message in first line of java console:
“Exception in thread “AWT-EventQueue-2” java.lang.UnsatisfiedLinkError: no jogl in java.library.path”

this is my java code in simplest way:

import javax.swing.*;
import net.java.games.jogl.*;

public class demo extends JApplet
{
    public void init()
    {
        GLCanvas canvas = GLDrawableFactory.getFactory().createGLCanvas(new GLCapabilities());
        getContentPane().add(canvas);
    }
    
    public void start()
    {
    }

    public void stop()
    {
    } 
}

and this is html:

<applet code="com.sun.opengl.util.JOGLAppletLauncher"
     width=300
     height=300
     codebase="http://my-applet-addres-with-libraries"
     archive="jogl.jar,demo.jar">
  <param name="subapplet.classname" VALUE="demo">
  <param name="subapplet.displayname" VALUE="demo applet">
  <param name="progressbar" value="true">
  <param name="cache_archive" VALUE="jogl.jar,demo.jar">
  <param name="cache_archive_ex" VALUE="jogl.jar;preload,demo.jar;preload">
</applet>

and of corse, I really sorry for my terrible english.

greetings!

Does the Gears applet test on the jogl-demos web page work?

Are you sure the code example you posted is correct? It looks like you’re linking against an older version of jogl.jar.

I would try to go step-by-step to debug this. First try to replicate the Gears applet on your web server and get it working on your friend’s computer. First make sure no copies of jogl.jar or the JOGL DLLs are present on that machine.

yes, when I delete my jogl.dll file to test gears applet, everything works fine on offiial applet test site: https://jogl-demos.dev.java.net/applettest.html

After that, i download newest jogl-demos.jar from beta 3 directory and upload it to server and change html file to the oryginal html from this gear demo source. (I have only changed codebase parameter to my site)

But it still did`n work, this exception uccure:

“Exception in thread “AWT-EventQueue-2” java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file sun/java2d/opengl/OGLUtilities”

I have trying to use oryginal gear source code, but there are errors on compilation. In gear demo source they try to import not existing libraries:

import javax.media.opengl.;
import com.sun.opengl.util.
;

You have an old version of jogl somewhere on your computer. Look for jogl.jar and jogl*.dll on your computer and delete this files. Use at least the JSR-231 beta 03 build. Caution: don’t install jogl in your JRE, create an own directory for it like suggested here and in the JOGL Users’s Guide. After that try again to go through the steps that ken suggested.

Yes, I had old libraries on my local computer, but on server are still newest. I copy the jogl-demos.jar to serwer and try to run gears demo, but I have another error message:

“Exception in thread “AWT-EventQueue-2” java.lang.ClassFormatError: Incompatible magic value 1008813135 in class file sun/java2d/opengl/OGLUtilities”

jogl-demos.jar is from beta 3 directory. The same message appeares when I trying to run my applets.

sdsd

I think your CLASSPATH is messed up. It should not contain any entries pointing directly into any JREs on your computer.

I cant believe! You know how I solve this problem? I just moved all files to another server and its works! Could anybody tell me why java applets depend on its location?

I am absolutely sure, that problem affect this old server.

Thanks for your help guys, i can go sleep now, at last…

Something wrong with the MIME type being returned for jar files so they were transferred using ASCII instead of binary format?

Browser caching issues?