or drag border to resize
Best viewed with Firefox
Bitcoin donation, thank you
Post this site to
2. Compile and run
Windows example :
( The first part, like C:\Program Files\Java\jdk1.7.0_25, depends on what version you have downloaded and where you've installed it.)
This will either result in the Simplest.class file or in error messages, if you've 'mishpeledd' something, omitted a ; , have a } too many, mixed up lowercase,uppercase, etc....
The Simplest.class file contains Java instructions, bytecodes.
Open the HTML file in your browser and see the applet run, if your Java Console security settings allow it.
Another way to test an applet, is by using Sun's appletviewer tool:
Alternatively, you could use a tool (an IDE) like Eclipse. Working with Eclipse is explained in our Eclipse guide. (In Eclipse you don't have to provide the HTML file and you can run an applet by selecting the source file name, fe 'Simplest.java' and then choosing 'Run, Run As, Java Applet')
Another way to do development is by using
Oracle's Netbeans tool.
Make a new project by choosing File, New project
Running a stand-alone application, without a browser, with a 'main' method, is different. We deal with that in our lesson '36.Stand-alone application'. That would be something like
HAVE FUN !