问题描述
我对 Java 比较陌生,有一个 Java 应用程序,它由几个包和许多类组成.我希望能够在 Web 浏览器中运行此应用程序.我该怎么做?
I am relatively new to Java and have a Java application consisting of a couple of packages and a number of classes. I want to be able to run this application in a web browser. How do I go about doing this?
推荐答案
Java Web Start 是一种在 Web 上部署 Java 应用程序的好技术.您可以从网页链接启动应用程序,尽管应用程序在 Web 浏览器框架之外运行:Java Web 入门教程.
Java Web Start is a good technology for deploying Java applications over the web. You can start the application from a web page link, although the application runs outside of the web browser frame: Java Web Start Tutorial.
Java 小程序允许您在网页中嵌入 Java 应用程序.对于大型应用程序,它有一些严重的缺点.
Java applets allow you to embed a Java application in a web page. It has some serious drawbacks for larger applications.
Servlet(和 Java 服务器页面)是服务器端生成网页(和其他 Web 内容)的合适技术,但这些技术不会帮助您部署现有的基于 Swing 的 Java 应用程序,除非您准备好更换用户界面.
Servlets (and Java Server Pages) are appropriate technologies for server-side generation of web pages (and other web content) but these technologies won't help you to deploy an existing Swing-based Java application, unless you are prepared to replace the user interface.
这篇关于在 Web 浏览器中运行 Java 应用程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!