This preview shows pages 1–2. Sign up to view the full content.
This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: lab1Introduction to Java programming October 9, 2007 1 Objectives Java programming process Commonly-used Unix commands Jgrasp and Eclipse for Java 2 Introduction Like any other program language, to programming in Java, we need at least two tools: an text editor and a compiler, plus an additional software which is required by Java only: Java virtual machine. To write Java code, you can use any text editor: Notepad, wordpad, vi, emacs/xemacs. The next thing after the coding is to compile the code using javac, the Java compiler. For example: javac Sample1.java will compile the Java program in Sample1.java. The output will be Sam- ple1.class, which is a binary file to be run on Java virtual machine. To run the program, use java Sample1 Remember: do not add .class to the name of the program. 3 Create directory for lab1 For this course, we will be developing Java applications on Solaris machines, which are a lot different from the PCs we use everyday. The first thing you should do after you logged onto a Unix box is to open a console/terminal,...
View Full Document