| ★ wanayoo — archive 1999 http://java.sun.com/developer/onlineTraining/new2java/programming/learn/ | Nouvelle recherche | Portail wanayoo |
|
Programming Center
Java Platform Overview |
Getting Started |
Step-by-Step Programming To write a Java program, you need to download the development kit for J2SE for Windows, Linux, Solaris, or Mac users. Development kits are also available in other languages. Next set up the software, and then configure your system.
Next you need to learn how to invoke the compiler and interpreter.
The following three examples use the
When compiling and running, be sure to Application
Compile the javac ExampleProgram.java java ExampleProgram Applet
Compile the javac SimpleApplet.java You can run the applet in appletviewer (a Java platform tool for running applets independently of the browser) or in the browser. Either way you need an HTML file for the applet. Here is the HTML file:
To run the applet in the browser, you load the HTML file. To run the
applet in appletviewer with an HTML file named appletviewer simple.html Servlet
To compile the javac ExampServlet.java Servlets can be called directly by typing their uniform resource locator (URL) into a browser's location window after you've started the server.
Servlets can also be invoked from an HTML form by specifying their
URL in the definition for a Servlets can be called by any program that can open an hypertext transfer protocol (HTTP) request.
| |||||||
|
| ||||||||||||