Java Applet concept: An applet is Java bytecode sent over HTTP and then “invoked using the HTTP protocol” on the user’s computer. Is that characterization correct?

Difficulty: Easy

Correct Answer: Incorrect

Explanation:


Introduction / Context:
Applets were client-side Java programs embedded in web pages and executed in a browser’s JVM plugin or applet viewer. While distribution typically occurred via HTTP, execution was performed by the local JVM under a security sandbox, not by HTTP itself.



Given Data / Assumptions:

  • Applets are delivered as .class or .jar files referenced by HTML tags.
  • The browser downloads resources over HTTP(S).
  • Execution occurs locally inside the Java plugin/JVM, not via the network protocol.



Concept / Approach:
Distinguish transport from execution: HTTP transports bytes; the JVM executes bytecode. The statement confuses these roles, implying that HTTP “invokes” the program, which is inaccurate.



Step-by-Step Solution:
Load a page with an applet tag referencing a .jar.Browser fetches the file via HTTP/HTTPS.The JVM plugin loads classes and executes start() under security policies.User interacts locally; network calls (if any) use sockets/HTTP as coded.Termination occurs via stop()/destroy() lifecycle methods.



Verification / Alternative check:
Observe that applets can run offline once downloaded (subject to policy), further showing execution is not “by HTTP.”



Why Other Options Are Wrong:
Signed status, old browsers, or versions do not make HTTP the execution engine.



Common Pitfalls:
Conflating delivery protocol with runtime; overlooking sandbox restrictions.



Final Answer:
Incorrect

More Questions from JDBC, Java Server Pages, and MySQL

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion