how can i execute through browser. plese tell me.

Dani AI

Generated

The replies from , and show the classic way to host an applet, but a few important points are missing and the environment has changed since this thread was started.

Browsers no longer run the Java browser plugin in current releases (NPAPI-based plugins were removed), so an embedded applet will normally fail in modern Chrome/Edge/Firefox. For development and quick testing, use the JDK tool that runs applets outside a browser. That avoids browser-plugin issues and gives clearer error output. If the goal is to support legacy users who insist on running the applet in a browser, consider one of the compatibility runtimes that implement JNLP/applet support or applet-to-JavaScript translators, but understand those are third‑party workarounds and have limits.

Security and deployment details that are often overlooked:

  • Recent JREs block unsigned or improperly signed applets; production applets normally must be signed with a trusted certificate and include the proper manifest attributes (permission and origin-related entries) to avoid being silently blocked.
  • Serve class/JAR files over HTTP(S) from a web server (not file://) and set correct MIME types.
  • Use the Java console and server logs to capture exceptions and security failures; those messages pinpoint signing, manifest, or classpath problems.

If maintaining a browser applet is not mandatory, migrate. Options include shipping a standalone Java application, rewriting the UI in web technologies (HTML5/JS) backed by a Java server, or using a JNLP-based launcher (there are open implementations that can run legacy JNLP/JAR setups). For short-term compatibility, look at community tools that run legacy applets, but plan to migrate because browser and platform vendors have moved away from in‑browser Java for security reasons.

Recommended Answers

All 3 Replies

how can i execute through browser. plese tell me.

write the html file like below

<html>
<body>
<applet code="ur class name" width="width of applet" height="height of applet">
</applet>
</body>
</html>

thn open this file into ur browser.

Or maybe if there are multiple class files package them in jar file and then include them using OBJECT or APPLET.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.