While loading html page error given, Applet is not loaded due to java.lang.ClassNotFoundException:
1 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   harshat_Taide
Posted On:   Monday, July 22, 2002 02:04 PM

Hi I have an applet myApplet7.class that uses swing components to render a JTree. I have downloaded the lastest Java plugin to run swing components. I embed this applet in an html page,page1.html, using the object tag as follows. codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,1,2,0" > When I open the page1.html from my local hard disk, the applet is initialised and runs properly but I need to run my code from server. SO I map to a server . There I place the code and when I run it I get this error Java.lang.ClassNotFoundException: myApplet7.class Earlier when I   More>>

Hi I have an applet myApplet7.class that uses swing components to render a JTree. I have downloaded the lastest Java plugin to run swing components.
I embed this applet in an html page,page1.html, using the object tag as follows.




codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,1,2,0" >






When I open the page1.html from my local hard disk, the applet is initialised and runs properly but I need to run
my code from server. SO I map to a server . There I place the code and when I run it I get this error



Java.lang.ClassNotFoundException: myApplet7.class


Earlier when I was not using the swing componenets the applet was working very fine on the server but I had to add
swing components (I needed to create a tree structure) so I had to install the latest plugin which installed j2re1.4.0_01 on my m/c. But when I installed this
my page1.html does not execute from the server. It gives the above error.



I looked at the other similar postings but they asked me to create a jar file so I created my jar file with all my
class files including applet.class



But again if I open the file from my browser saying open page1.html and I change the object tag to




codebase="http://java.sun.com/products/plugin/1.2/jinstall-12-win32.cab#Version=1,1,2,0">











I get the error

java.io.IOException: Server returned HTTP response code: 401 for URL: http://sdp2002errhndl/javaapplet/applet.jar



and the error

load: class myApplet7.class not found.



java.lang.ClassNotFoundException: myApplet7.class




Can u please help me.
Thanks,
Harsha


Any help would be appreciated.
Thanks,
Harsha

   <<Less

Re: While loading html page error given, Applet is not loaded due to java.lang.ClassNotFoundException:

Posted By:   Prashanth_Sukumaran  
Posted On:   Thursday, July 25, 2002 07:50 PM



Hi Harsha,



May be this will help you



This is the Object tag of my applet.




Look at the code, codebase and archive param. This should give you the idea. In both the situations you did something different. This is the right way to do.


width="255" height="335" align="baseline"

codebase="http://java.sun.com/products/plugin/1.3/jinstall-13-win32.cab#Version=1,3,0,0" MAYSCRIPT>














Hope this helps.



Prashanth Sukumaran
About | Sitemap | Contact