Java 2.0 Complete Tutorial

Java - The most demanded programing language. It is used inside your dvd player, mobile phone, internet and even inside your car. It is platform independent, that mean it work on all operating systems.

Java is well popular in mobile phones, especially in games. This Java tutorial will guide you to learn all features of Java and developing standard commercial applications.

This blog updates every week. Please post your comments about this site.

Use google search for better results

Google
 

Thursday, September 6, 2007

How to embed a java applet into a web page?

Lets now connect our hello applet (hello.class file) into a web page and run it. I hope you have a basic knowledge in HTML which is web page language. Use the notepad or your text editor to create this web page. Type these codes and save it to the same directory where hello.class file is as a .htm or .html file.



Now open the web page with any internet browser such as Internet Explorer. Bingo! You will see your applet running "Hello from Java!" displays on the web page.

You can also view your applet with java applet viewer. Go to the Command Prompt and type this command to open your applet in the applet viewer.

c:\java12\hello\appletviewer hello.htm

Next we will try to understand how exactly this applet works, line by line.

2 comments:

Hem Rai said...

Great Tutorial on Java Applet

Attiq Ur Rehman said...

This is a really nice post for something more about java applet. Thanks for the post and keep adding more about this and other applet as well.
Web Design Quote