I once knew how to write a program that has both applet and main() in it. It
can be run as "> java XXX" or in an html. But now I forget. Can someone tell
me how to do that? Thanks.
m******y 发帖数: 588
2
You need to compile the applet code into XXX.class using jdk.
Then you can use the applet in the html page like
HTML Test Page
The applet will appear below in a Java enabled browser.
【在 z*y 的大作中提到】 : I once knew how to write a program that has both applet and main() in it. It : can be run as "> java XXX" or in an html. But now I forget. Can someone tell : me how to do that? Thanks.