/* to end execution of your application type C (^C) */ import java.awt.*; class Application extends Frame { public static void main(String [] args) { Frame f = new Application(); f.setSize(200,200); f.show(); } // main public void paint(Graphics g) { g.drawString ("hello",30, 60); } // paint } // Application _____________________________________________ If get an error message like this when you try to run your application, here are some things you can do. Exception in thread "main" java.lang.InternalError: Can't connect to X11 window server using ':0.0' as the value of the DISPLAY variable. at sun.awt.X11GraphicsEnvironment.initDisplay(Native Method) at sun.awt.X11GraphicsEnvironment.(X11GraphicsEnvironment.java:6 1) at java.lang.Class.forName0(Native Method) at java.lang.Class.forName(Class.java, Compiled Code) etc. Solutions (pick the one you like the best) 1) Come to the Media Union and login to a Sun machine to compile and run your application. 2)(PC) If the computer you are sitting at has a Java compiler (test this by getting a DOS window and typing javac), ftp your source code to the machine you are using and compile and run it in the DOS window. Then ftp the finished code back to your ITD or SI or CAEN account. (If your code compiles in UNIX but not on the PC, then the version of Java on the PC is too old. Find another lab to work in.) 3) (PC) Start eXceed (if you are SI, it is a NAL object - download it if it is not already on the PC. You should find it in the Programs menu in the Start menu). Telnet to the computer where you are writing your application. At the telnet prompt type setenv DISPLAY yourComputerNameOrIP:0.0 (where yourComputerNameOrIP is the name or IP address of the computer you are sitting at) NOTE - case and spaces are critical. Then run your application. 4) (Mac) See if the Mac has CodeWarrior. If it does, use Fetch to get your .java file and then compile and run it in CodeWarrior. (If your code compiles in UNIX but not in CodeWarrior, then the version of CodeWarrior is too old. Try one of the other solutions.)