JavaWebStart error on Windows

Hello,

I’m writing tutorials on learning OpenGL using JOGL and Java and for each article, i link a demo which could be launched with JWS.

Here is my JNLP descriptor :

<?xml version="1.0" encoding="utf-8"?>
<jnlp spec="1.0+" codebase="http://info-rital.developpez.com/tutoriel/java/opengl/opengl1/fichiers/" href="opengl1.jnlp">
  <information>
    <title>Apprendre l'OpenGL avec Java : Article 1</title>
    <vendor>InfoRital</vendor> 
    <homepage href="http://info-rital.developpez.com/"/>
    <description>Création d'une fenêtre pour faire de l'OpenGL</description>
    <description kind="short">Création d'une fenêtre pour faire de l'OpenGL</description>
    <offline-allowed/>
  </information>
  <resources> 
    <j2se version="1.4+"/> 
    <jar href="opengl1.jar" main="true"/>
    <extension name="jogl" href="http://download.java.net/media/jogl/builds/archive/jsr-231-webstart-current/jogl.jnlp" />
    <property name="sun.java2d.noddraw" value="true"/> 
  </resources>    
  <application-desc main-class="developpez.opengl.Article1" />
</jnlp>

As you can see, i use the resource : for loading JOGL libs.

It works fine on Linux but on Windows, it doesn’t want to launch.
The error is caused by “no jogl in library path”.

If you want to try, the link is : http://info-rital.developpez.com/tutoriel/java/opengl/opengl1/fichiers/opengl1.jnlp
It’s really strange because on linux, i don’t have the libs installed (neither on Windows) and it loads the jsr-231 without problem.

Thanks.

Scan your hard disk for all copies of jogl.jar and jogl*.dll and delete them. I think it must be the case that you’ve dropped a jogl.jar into jre/lib/ext of one of your Java installations on the machine, which doesn’t play well with Java Web Start.

Thanks, you’re right, i’ve found the libs on the jre folders and i deleted them. But it’s strange because the window appears green instead of black on this computer…

All i’m doing is to set up the the basic code to perform opengl on a frame.

[quote]import java.awt.*;
import java.awt.event.WindowAdapter;
import java.awt.event.WindowEvent;

import javax.media.opengl.*;

import com.sun.opengl.util.*;

public class Game implements GLEventListener {

public static void main(String[] args) {
	Frame frame = new Frame ("Game");
	GLCanvas canvas = new GLCanvas();
	
	canvas.addGLEventListener(new Game());
	frame.add(canvas);
	
	final Animator animator = new Animator();
	
	frame.addWindowListener(new WindowAdapter() {
		public void windowClosing(WindowEvent e) {
			new Thread(new Runnable() {
				public void run() {
					animator.stop();
					System.exit(0);
				}
			}).start();
		}
	});
	
	frame.setSize(300, 300);
	frame.setVisible(true);
	
	animator.start();
}

public void init(GLAutoDrawable drawable) {
	
}

public void display(GLAutoDrawable drawable) {

}

public void displayChanged(GLAutoDrawable drawable, boolean modeChanged, boolean deviceChanged) {
	
}

public void reshape(GLAutoDrawable drawable, int x, int y, int width, int height) {
	
}

}
[/quote]

You aren’t even doing a glClear() in your display callback, so any output in the window will be garbage.