[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 401
  • Last Modified:

How to call another class in applet?

Hello,
I have an applet A, inwhich I want to use another classes B and C which are defined in another package.
In fact, I already compressed B and C into D.jar file, and copy D.jar into the same directory with the applet A.
But when I run applet A (in browser), it appear an error:
java.lang.NoClassDefFoundError: B
Please show me how to solve this problem in urgen
Thanks a lot
0
ndhai
Asked:
ndhai
1 Solution
 
objectsCommented:
add the jars to the archive parameter of your applet tag.
0
 
JugglerWCommented:
Your applet tag should looks like:

                                                       <applet
                                                                code="A.class"
                                                                width="www"
                                                                height="hhh"
                                                                archive="D.jar"
                                                        >
                                                                <!-- If you want support MS VM in IE  you also have to create a CAB file (use cabarc.exe) -->
                                                                <param name="cabbase"            value="D.cab">
                                                        </applet>
   
0

Featured Post

[Webinar] Cloud and Mobile-First Strategy

Maybe you’ve fully adopted the cloud since the beginning. Or maybe you started with on-prem resources but are pursuing a “cloud and mobile first” strategy. Getting to that end state has its challenges. Discover how to build out a 100% cloud and mobile IT strategy in this webinar.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now