📜  Java应用程序和Java Applet 之间的区别

📅  最后修改于: 2021-09-12 11:11:16             🧑  作者: Mango

Java应用:
Java应用程序就像是在虚拟机的支持下运行在底层操作系统上的Java程序。它也称为应用程序。图形用户界面不是执行Java应用程序所必需的,它可以在有或没有它的情况下运行。

Java小程序:
小程序是可以嵌入到网页中的Java程序。它在 Web 浏览器内运行并在客户端工作。小程序使用APPLETOBJECT标签嵌入 HTML 页面中,并托管在 Web 服务器上。小程序用于使网站更具活力和娱乐性。

应用程序和小程序的区别:

Java Application Java Applet
Applications are just like a Java programs that can be execute independently without using the web browser. Applets are small Java programs that are designed to be included with the HTML web document. They require a Java-enabled web browser for execution.
Application program requires a main function for its execution. Applet does not require a main function for its execution.
Java application programs have the full access to the local file system and network. Applets don’t have local disk and network access.
Applications can access all kinds of resources available on the system. Applets can only access the browser specific services. They don’t have access to the local system.
Applications can executes the programs from the local system. Applets cannot execute programs from the local machine.
An application program is needed to perform some task directly for the user. An applet program is needed to perform small tasks or the part of it.