Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Extend Problem In java Applet - Child Class Not Loading Only Parent Class

817750Nov 23 2010 — edited Dec 10 2010
I have a situation like this
Class A extends Class B
The class A and Class B have its own main functions ...
Class A calls the functions of Class B


I complied and Run the code It works fine as standalone ..made it as a Jar ...Then also everything works fine ..

...

Bt when i called the Jar in a An HTML page through Applet Code ....only the Class B directly works ...

i added the Class A at the Applet CODE tag like this

<APPLET CODE="A.class" ARCHIVE="A.jar" WIDTH="100%" HEIGHT="100%">

but its still load the Class B directly ..

cleared the cache and tried all the ways i Know ...

For checking i removed the main function in Class A and made the jar file again and loaded ...
Still it directly loads the class B...

but if i removed the Class B 's main function the applet shows error ..


add a message in the Class A's main function ...it nt showing not in the java web console but shows in the CMD line...


Dnt knw what to do ...im a newbee .. So i hopes i missed something every important in Coding ...

NB: what i extended is a VNCViewer application and it loads the screen of a remote machine by default..
I just needed to add two buttons so that i can switch between two machines throught the browser ....

Edited by: 814747 on Nov 23, 2010 1:18 AM..Sorry for Spelling mistakes ...
This post has been answered by EJP on Nov 23 2010
Jump to Answer

Comments

Locked Post
New comments cannot be posted to this locked post.

Post Details

Locked on Jan 7 2011
Added on Nov 23 2010
9 comments
393 views