Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

Integrer une applet java dans une page html

2 réponses
Avatar
j.bessane
Bonjour =E0 tous,

J'ai cr=E9=E9 un projet web sous Netbeans avec une applet java. Lorsque j'e=
ssai d'afficher mon application java dans une page html, l'applet s'affiche=
mais le contenu est vide. Voici mon code html :
=20

<html>
<head>
<title>Application CrashBuster</title>
<meta charset=3D"UTF-8">
<meta name=3D"viewport" content=3D"width=3Ddevice-width">
</head>
=20

<body>
<p><img border=3D"0" src=3D"OBS_logo.jpg" width=3D"150" height=3D"7=
0"><img align=3D"right" border=3D"0" src=3D"CIS_logo.jpg" width=3D"130" hei=
ght=3D"60"></p>
=20
<center>
<b>
<Font size=3D+3> <font color=3D"#ED7F10"> <font face=3D"Sego=
e UI"> CrashBuster </font></font></font>
</b>
</center>
=20
<center>
<APPLET code=3D"AppliJava.class" width=3D"800" height=3D"500"><=
/APPLET>

</center>
=20
</body>
=20


</html>


De plus j'ai bien mis les fichiers AppliJava.class dans mon fichier o=F9 se=
trouve l'index html.


Merci par avance,

2 réponses

Avatar
Vincent Breton
Le 19/02/2014 16:17, a écrit :
Bonjour à tous,

J'ai créé un projet web sous Netbeans avec une applet java. Lorsque j'essai d'afficher mon application java dans une page html, l'applet s'affiche mais le contenu est vide. Voici mon code html :


<html>
<head>
<title>Application CrashBuster</title>
<meta charset="UTF-8">
<meta name="viewport" content="widthÞvice-width">
</head>


<body>
<p><img border="0" src="OBS_logo.jpg" width="150" height="70"><img align="right" border="0" src="CIS_logo.jpg" width="130" height="60"></p>

<center>
<b>
<Font size=+3> <font color="#ED7F10"> <font face="Segoe UI"> CrashBuster </font></font></font>
</b>
</center>

<center>
<APPLET code="AppliJava.class" width="800" height="500"></APPLET>

</center>

</body>



</html>


De plus j'ai bien mis les fichiers AppliJava.class dans mon fichier où se trouve l'index html.


Merci par avance,



Regarde du côté des paramètres de sécurité de ton navigateur et de ton OS.
Avatar
inconnu
On 23. 04. 14 12:35, Vincent Breton wrote:
<meta name="viewport" content="widthÞvice-width">



C'est pour des tablettes/smartphones. C'est sûr que ca va pas marcher la
dessus !


Pour le reste, utilise le js de deployment à placer dans ta page :


<script src="http://www.java.com/js/deployJava.js"></script&gt;
<script>
var attributes = {
codebase:'http://tomdomaine/dirApplet',
code:'AppliJava.class',
archive:'toJar.jar',
width:1200,
height:650,
hspace:0,
vspace:0,
align:'top'};
var version = '1.5';
var parameters = '';
deployJava.runApplet(attributes, parameters, version);
</script>


Att : le code doit être le nom complet de la classe avec package

HTH