Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

doubts with code and codebase in the applet tag

 
suppi venkat
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The name of my html file is download.html.It is in the E:\Click_Eat folder.
I have the html file calling the applet Download.The applet'Download' is in the C:\ecllipse\ folder, . class file of the applet is in C:\Supjava\EcllipseProjects\SwingTest.My applet 'Download ' is in the package SwingTest.
iam using

<html>
<head>
<title>DOWNLOADING FROM SUN.COM</title>
</head>

<body>

<APPLET

CODE ="SwingTest\Download.class" CODEBASE="SwingTest" WIDTH=200 HEIGHT=200 >


</APPLET>

</body>

</html>

this works.

1)note the code and the codebase values.Here iam not specifying the entire path of the .class file of the applet in the code base which is present in a different path compared to where my html is stored.

2)Iam using the package name in the code value
ie code=SwingTest/Download.class.If i just use
code=Download.class it gives me an error java.lang.NoClassDefFoundError: Download (wrong name: SwingTest/Download)
please explain why ? and what values should i put for code and codebase.

thankyou
 
Joe Ess
Bartender
Pie
Posts: 9264
10
Linux Mac OS X Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The path in the CODEBASE parameter is relative to the directory where the HTML is located. Take a look at Using the APPLET tag for more info.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic