| Preparing for your First Program |
| Last modified on September 11, 2001 by rpj@cs.rit.edu. | ||
| Preparing for your First Program |
| Get into the Lab | |
| Last modified on September 11, 2001 by rpj@cs.rit.edu. | ||
| Preparing for your First Program |
| Get into the Lab |
| Open emacs | |
| or your favorite editor |
| Last modified on September 11, 2001 by rpj@cs.rit.edu. | ||
| Preparing for your First Program |
| Get into the Lab |
| Open emacs |
| Open a shell | |
| and transfer to the drive and directory of your choice |
| Last modified on September 11, 2001 by rpj@cs.rit.edu. | ||
| Preparing for your First Program |
| Get into the Lab |
| Open emacs |
| Open a shell |
| Create Bonjour.java | |
in that directory.
import java.applet.*;
import java.awt.*;
public class Bonjour extends Applet {
public void paint(Graphics g) {
g.drawString("Comment allez vous?", 20,10);
}
}
|
| Last modified on September 11, 2001 by rpj@cs.rit.edu. | ||
| Preparing for your First Program |
| Get into the Lab |
| Open emacs |
| Open a shell |
| Create Bonjour.java |
| Compile it | |
| by typing "javac Bonjour.java" in the dos shell. For a while you may need to set the path and classpath as discussed in lab. |
| Last modified on September 11, 2001 by rpj@cs.rit.edu. | ||
| Preparing for your First Program |
| Get into the Lab |
| Open emacs |
| Open a shell |
| Create Bonjour.java |
| Compile it |
| Create Bonjour.html | |
[APPLET code = "Bonjour.class", width=150, height=60] [/APPLET] (Replace the square brackets with angle brackets. Why???) |
| Last modified on September 11, 2001 by rpj@cs.rit.edu. | ||
| Preparing for your First Program |
| Get into the Lab |
| Open emacs |
| Open a shell |
| Create Bonjour.java |
| Compile it |
| Create Bonjour.html |
| View the Bonjour.html in Netscape | |
| (or your favorite browser)
|
| Last modified on September 11, 2001 by rpj@cs.rit.edu. | ||
| Preparing for your First Program |
| Get into the Lab |
| Open emacs |
| Open a shell |
| Create Bonjour.java |
| Compile it |
| Create Bonjour.html |
| View the Bonjour.html in Netscape |
| A similar Application (as opposed to Applet) | |
public class Hi {
public static void main(String[] args) {
System.out.println("Hi!");
}
}
|
| Last modified on September 11, 2001 by rpj@cs.rit.edu. | ||