Java小程序作为独立的Windows应用程序?
我有一个Java小程序,是为了只在Windows上运行。 (它使用一个第三方COM对象;它是不是跨平台)
I have a Java applet that is meant to run only on Windows. (It uses a 3rd party COM object; it is not cross-platform.)
有没有一种方法来运行一个Java小程序作为Windows上的独立应用程序?
Is there a way to run a Java applet as a stand-alone application on Windows?
虽然您可以运行它,还有如何运行的Java作为应用程序与它是如何运行作为一个applet之间的细微差别。一个带有init方法,另始于一个主要方法,而线程和事件队列的关系,启动是启动有点不同。
Although you can certainly run it, there are subtle differences between how Java runs as an application vs. how it runs as an applet. One starts with an init method, the other starts with a main method, and the threading and event queue relationship to startup are a bit different.
下面是从太阳在如何做到这一点的一些文件。如果您在使用JApplet的事情略有变化,但这个想法是一样的。
Here is some documentation from Sun on how to do it. If you are using JApplet things change slightly, but the idea is the same.