The differences between Java application and Java applet

在Java语言中,能够独立运行的程序称为Java应用程序(Application)。Java语言还有另外一种程序--Applet程序。Applet程序(也称Java小程序)是运行于各种网页文件中,用于增强网页的人机交互、动画显示、声音播放等功能的程序。
In the Java language ,the program can ran independently is called Java application.Java language also has an another program called

Java Appled,which always run in various webpages to enhance the corresponding between human and machin、vedio's display and performance of sound etc.    
    Java Applet和Java Application在结构方面的主要区别表现在:

    The major differences between Java Applet and Java application are here:
    
    (1)运行方式不同。Java Applet程序不能单独运行,它必须依附于一个用HTML语言编写的网页并嵌入其中,通过与Java兼容的浏览器来控制执行。Java Application是完整的程序,可以独立运行,只要有支持Java的虚拟机,它就可以独立运行而不需要其他文件的支持。
          the way of running: Java Applet can't run by itself,which means that it must relay on and inset in a webpage build by HTML ,and use  browser to contrl . Java Application is a complete program ,which can run alonely without any files's support if there has

Java Virsual Machine. 
    (2)运行工具不同。运行Java Applet程序的解释器不是独立的软件,而是嵌在浏览器中作为浏览器软件的一部分。Java Application程序被编译以后,用普通的Java解释器就可以使其边解释边执行,而Java Applet必须通过网络浏览器或者Applet观察器才能执行。
        the tools of runnig:
    (3)程序结构不同。每个Java Application程序必定含有一个并且只有一个main方法,程序执行时,首先寻找main方法,并以此为入口点开始运行。含有main方法的那个类,常被称为主类,也就是说,Java Application程序都含有一个主类。而Applet程序则没有含main方法的主类,这也正是Applet程序不能独立运行的原因。尽管Applet没有含main方法的主类,但Applet一定有一个从 java.applet.Applet派生的类,它是由Java系统提供的。
       the structure of program:
    (4)Java Applet程序可以直接利用浏览器或AppletViewer提供的图形用户界面,而Java Application程序则必须另外书写专用代码来营建自己的图形界面。

    
      graphical user interface (GUI)
    (5)受到的限制不同Java Application程序可以设计成能进行各种操作的程序,包括读/写文件的操作,但是 Java Applet 对站点的磁盘文件既不能进行读操作,也不能进行写 操作。然而,由于 Applet的引入,使Web页面具有动态多媒体效果和可交互性能,这使由名为超文本、实为纯文本的HTML语言编写成的Web页面真正具有了超文本功能,不但可以显示文本信息,而且还可以有各种图片效果和动态图形效果,从而使页面显得生动美丽;另外,Applet使Web页面增加了按钮等功能,从而增加了交互性。
    
    Java Applet和Java Application在执行方面的主要区别表现在:Java Application一般是在本地机上运行,而Java Applet一般放在服务器上,它是根据本地机的请求被下载到本地机,然后才在本地机上运行。

原文地址:https://www.cnblogs.com/Micheal-G/p/4933096.html