aspose file tools*
The moose likes Applets and the fly likes ClassNotFoundException in Applet Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Applets
Bookmark "ClassNotFoundException in Applet" Watch "ClassNotFoundException in Applet" New topic
Author

ClassNotFoundException in Applet

Archana Jain
Greenhorn

Joined: Nov 03, 2013
Posts: 11
Hi,
I am running an applet with the code as below:-

<!DOCTYPE html>
<html>
<head>
<style>
.pos_right
{
position:relative;
left:950px;
top:274px;
}
</style>
</head>
<body>
<div id="container" style="width:1200px">

<div id="header" style="background-color:#E55451;">
<h2 style="margin:auto;width:80%;height:50%;">CHESS GAME</h2></div>

<div id="menu" style="background-color:#E77471;height:450px;width:200px;float:left;">
</div>
<div class="pos_left" style="background-color:#EEEEEE;height:450px;width:1000px;float:left;">
<object type="application/x-java-applet" width="100" height="100">
<param name="code" value="chess.ChessClient" />
<param name="archive" value="ChessClient.jar" />
<param name="archive" value="json-simple-1.1.1_1.jar" />
Applet failed to run. No Java plug-in was found.
</object>
<div class="pos_right">
<object type="application/x-java-applet" width="50" height="70">
<param name="code" value="chat.ChatClient" />
<param name="archive" value="ChatClient.jar" />
<param name="java_arguments" value="-Djava.security.manager"/>
Applet failed to run. No Java plug-in was found.
</object>
</div>
</div>
<div id="footer" style="background-color:#E55451;clear:both;text-align:center;">
Archana Jain</div>
</div>
</body>
</html>


The ChessClient.jar is available in the directory and has the below contents:-

[root@ip-172-31-3-228 source]# jar cvfm ChessClient.jar mymanifest.txt chess
added manifest
adding: chess/(in = 0) (out= 0)(stored 0%)
adding: chess/ChessBoard$3.class(in = 796) (out= 507)(deflated 36%)
adding: chess/image/(in = 0) (out= 0)(stored 0%)
adding: chess/image/Black_king_w.jpg(in = 1621) (out= 1476)(deflated 8%)
adding: chess/image/White_pawn_c.jpg(in = 1273) (out= 1113)(deflated 12%)
adding: chess/image/Black_Knight_w.jpg(in = 1517) (out= 1365)(deflated 10%)
adding: chess/image/White_queen_w.jpg(in = 1697) (out= 1550)(deflated 8%)
adding: chess/image/Black_pawn_w.jpg(in = 1220) (out= 1059)(deflated 13%)
adding: chess/image/White_king_w.jpg(in = 1709) (out= 1568)(deflated 8%)
adding: chess/image/Black_Rook_w.jpg(in = 1457) (out= 1311)(deflated 10%)
adding: chess/image/White_queen_c.jpg(in = 1642) (out= 1498)(deflated 8%)
adding: chess/image/White_Knight_w.jpg(in = 1624) (out= 1477)(deflated 9%)
adding: chess/image/White_king_c.jpg(in = 1674) (out= 1530)(deflated 8%)
adding: chess/image/White_pawn_w.jpg(in = 1303) (out= 1131)(deflated 13%)
adding: chess/image/White_Knight_c.jpg(in = 1603) (out= 1455)(deflated 9%)
adding: chess/image/Black_Rook_c.jpg(in = 1441) (out= 1292)(deflated 10%)
adding: chess/image/Black_queen_w.jpg(in = 1550) (out= 1402)(deflated 9%)
adding: chess/image/White_Rook_w.jpg(in = 1467) (out= 1318)(deflated 10%)
adding: chess/image/Black_Knight_c.jpg(in = 1483) (out= 1330)(deflated 10%)
adding: chess/image/Black_Bishop_c.jpg(in = 1427) (out= 1275)(deflated 10%)
adding: chess/image/Black_king_c.jpg(in = 1594) (out= 1443)(deflated 9%)
adding: chess/image/Black_Bishop_w.jpg(in = 1449) (out= 1299)(deflated 10%)
adding: chess/image/White_Bishop_c.jpg(in = 1507) (out= 1359)(deflated 9%)
adding: chess/image/Black_queen_c.jpg(in = 1521) (out= 1372)(deflated 9%)
adding: chess/image/White_Rook_c.jpg(in = 1461) (out= 1315)(deflated 9%)
adding: chess/image/Black_pawn_c.jpg(in = 1208) (out= 1047)(deflated 13%)
adding: chess/image/White_Bishop_w.jpg(in = 1532) (out= 1388)(deflated 9%)
adding: chess/ChessBoard.class(in = 95986) (out= 26682)(deflated 72%)
adding: chess/ChessClient.class(in = 2240) (out= 1273)(deflated 43%)
adding: chess/ChessBoard$2.class(in = 784) (out= 484)(deflated 38%)
adding: chess/ChessBoard$cBoard.class(in = 2484) (out= 1353)(deflated 45%)
adding: chess/ChessBoard$ReadPartner2.class(in = 1881) (out= 1096)(deflated 41%)
adding: chess/ChessBoard$ReadPartner.class(in = 3104) (out= 1755)(deflated 43%)
adding: chess/ChessBoard$1.class(in = 756) (out= 478)(deflated 36%)
adding: chess/ChessBoard$sBoard.class(in = 635) (out= 392)(deflated 38%)
adding: chess/ChessBoard$coord.class(in = 417) (out= 298)(deflated 28%)
adding: chess/ChessBoard$4.class(in = 623) (out= 438)(deflated 29%)
adding: chess/ChessBoard$ReadPartner1.class(in = 1302) (out= 738)(deflated 43%)


Still I am getting the below error:-


ClassNotFoundException


chess.ChessClient

Can somebody help me regarding this?

Thanks in advance
Archana

Archana Jain
Greenhorn

Joined: Nov 03, 2013
Posts: 11
One more thing I forgot to write previously is that I am running the code from AWS server. And there only I am getting the error.
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41865
    
  63
The object tag is way outdated. Use an applet tag, or one of the applet deploy JavaScripts.


Ping & DNS - my free Android networking tools app
Archana Jain
Greenhorn

Joined: Nov 03, 2013
Posts: 11
Thanks the issue got resolved by using an applet tag
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: ClassNotFoundException in Applet