Showing posts with label java. Show all posts
Showing posts with label java. Show all posts

Thursday, March 21, 2013

How To Run a Java Applet

          To run a Java Applet using command prompt, we need to   create a HTML file and link it to our applet.

To do so, follow these steps:

  1. Write your java applet code in a text editor and save it as YourClassName.java ( eg. MyAppet.java for this program)
  2. Write the following html code in a text editor, replace the YourClassName.class with the name of your class and save it as YourClassName.html (eg. MyApplet.html for this program
  3. To compile use ‘javac YourClassName.java’
  4. To Run use 'appletviewer YourClassName.html'

   You can also refer from Link

Wednesday, March 20, 2013

Platform Independent ?

                Platform Independent


                The platform defines a standard around which a system can be developed. Once the platform has been defined,software developers can produce appropriate software and managers can purchase appropriate hardware and applications. The term is often used as a synonym of operating system.

              The term cross-platform refers to applications, formats, or devices that work on different platforms.For example, a cross-platform programming environment enables a programmer to develop programs for many platforms at once.

          Java is Platform Independent ?


           Yes, first of all JAVA is platform independent because in JAVA we are having JVM complier it will convert source code into BYTE CODE. so, this byte code will be understandable to any type of OS. so only JAVA is said to be PLATFORM INDEPENDENT.      In C/C++ be don't have that type of special compiler so, only it is said to be PLATFORM DEPENDENT .