RDV+DIAL chat illimit� dans ta r�g!
no save
Assistance
Achat
News

Forum | programmation
echec chargement applet en java
Deathwing, le mer. 21 janv. 2009 à 08:54:25
Bonjour,

Voila j'ai un petit souci d'affichage de mon diaporama sur mon site web. Lorsque je le testé sous easyphp, il c'est trés bien charger et il fonctionné. Maintenant que je l'ai mis en ligne, il ne veut plus se charger.
Il me met "Applet Diapo Notinited" et "echec du chargement de l'applet java"
Je suis pas un pro en java loin de la donc est-ce que quelqu'un aurait une idée.

Merci d'avance

EDIT : voila l'adresse du site en question : http://droit-narbonne.univ-perp.fr


Voila mon code html :


<APPLET code="Diapo.class" WIDTH="550" height="319" hspace="0" vspace="0" archive="diapo.zip">
<PARAM name=mainDelay value=5000>
<PARAM name=delay value=100>
<PARAM name=between value=0>
<PARAM name=message value="diaporama 3D fac de droit de narbonne">
<PARAM name=target value="_self">
<PARAM name=image1 value="images/diapo/fac1.jpg">
<PARAM name=image2 value="images/diapo/media.jpg">
<PARAM name=image3 value="images/diapo/narbonne5.jpg">
<PARAM name=image4 value="images/diapo/narbonne1.jpg">
<PARAM name=image5 value="images/diapo/narbonne2.jpg">
<PARAM name=image6 value="images/diapo/narbonne3.jpg">
<PARAM name=image7 value="images/diapo/narbonne4.jpg">
</APPLET>


et le code java :



import java.awt.*;
import java.awt.image.*;
import java.applet.*;
import java.net.URL;
import java.net.MalformedURLException;
import java.util.*;

/**
* The diaporama applet class
*
* @version $Id: Diapo.java,v 1.38 1999/07/13 17:26:21 dfrick Exp $
* @author Didier Frick (dfrick@dial.eunet.ch)
*/
public class Diapo extends java.applet.Applet {
protected int between=5;
protected int delay=100; /* ms */
protected int mainDelay=2500;
protected String message="diaporama 3D fac de droit de narbonne";
protected String target="_blank";
protected Image img;
protected FadingImageSource src;
protected Vector images;
protected URL link;
protected Thread thread;
protected ThreadGroup threadGroup;


/**
* This flag is used to downgrade the behavior of this class if it is running in a
* "problematic" environment like Netscape on the Macintosh.
* If it is true, only the first image will be displayed
*/
protected static boolean minimal=true;

static {
try {
String vendor=System.getProperty("java.vendor").toLowerCase();
String os=System.getProperty("os.name").toLowerCase();
minimal=vendor.startsWith("netscape")&&os.startsWith("mac");
} catch(Exception xc) {
xc.printStackTrace();
}
}

/**
* Read the applet parameter values
*/
public void init() {

try {
between=Integer.parseInt(getParameter("between"));
} catch (Exception x) {
;
}

try {
mainDelay=Integer.parseInt(getParameter("mainDelay"));
} catch (Exception x) {
;
}

try {
delay=Integer.parseInt(getParameter("delay"));
} catch (Exception x) {
;
}

try {
link=new URL(getDocumentBase(),getParameter("link"));
} catch (Exception x) {
;
}

String param;
param=getParameter("target");
if(param!=null)
target=param;

param=getParameter("message");
if(param!=null)
message=param;

images=new Vector();
for(int nImages=0;(param=getParameter("image"+(nImages+1)))!=null; nImages++) {
try {
Image i=getImage(getDocumentBase(),param);
if(i!=null) {
images.addElement(i);
if(minimal)
break;
}
} catch (Exception x) {
;
}
}
if(!minimal) {
threadGroup=Thread.currentThread().getThreadGroup();
src=new FadingImageSource(images,
between,
mainDelay,
delay,
bounds().width,
bounds().height);
img=createImage(src);
} else {
img=(Image)images.elementAt(0);
}
}

/**
* Override update to suppress flashing
*/
public void update(Graphics g) {
paint(g);
}

/**
* The paint method: draw the animated image if defined, otherwise
* clear the background.
*/
public void paint(Graphics g) {
if(img!=null)
g.drawImage(img,0,0,this);
}

/**
* The start method: create the ImageProducer and animated image
*/
public void start() {
thread=new Thread(threadGroup,src);
thread.start();
repaint();
}

/**
* The stop method stops the animation thread
*/
public void stop() {
if(thread!=null)
thread.stop();
thread=null;
}

public void destroy() {
src=null;
img=null;
images=null;
System.gc();
}

public String getAppletInfo() {
return "Diaporama $Revision: 1.38 $, Copyright (C) 1997,1998 by Didier Frick (dfrick@dial.eunet.ch)";
}

public String[][] getParameterInfo() {
return pinfo;
}

private String pinfo[][] = {
{ "between", "int", "Number of interpolated images between each image"},
{ "mainDelay", "int", "Time to display a non-interpolated image (ms)"},
{ "delay", "int", "Time to display an interpolated image (ms)"},
{ "link", "URL", "Document to show when user clicks on applet"},
{ "target", "String", "Frame in which to display link"},
{ "message", "String", "Text to display in status bar when mouse cursor enters applet"},
{ "image1", "URL", "First image. Used via Applet.getImage"},
{ "image2", "URL", "Next image. And so on... (without gaps)"}
};

/**
* Display message if mouse cursor enters applet.
*/
public boolean mouseEnter(Event evt,
int x,
int y) {
showStatus(message);
return true;
}

/**
* Display linked document if mouse clicked
*/
public boolean mouseDown(Event evt,
int x,
int y) {
if(link!=null)
getAppletContext().showDocument(link,target);
return true;
}

}

Configuration: Windows XP
Firefox 2.0.0.20


Deathwing
21 janv.
Suivant
REPONSES
Deathwing
21 janv.
tarek_dotzero
21 janv.
Deathwing
21 janv.
Deathwing
22 janv.
Deathwing
23 janv.
Version Web
Réalisé par RedShift
no save