Java Programming, Second edition

Download Report

Transcript Java Programming, Second edition

Java Programming
Working with TextPad
Using TextPad to Work with Java
• This text editor is designed for working
with Java
• You can download a trial version from
http://www.textpad.com
• Note that TextPad runs only under the
Windows operating system
Using TextPad to Save and Edit Source
Code
• To enter and edit source code, you can use
the same techniques that you use when
working with any other Windows text editor
How to use TextPad to Run an
Application
• Once you’ve completed the source code for
an application, you can run that application
by pressing [Ctrl]+2 or clicking Run Java
Application from the tools menu
Using Notepad to Save and Edit Source
Code
• To start Notepad using Windows
95/98/2000, click the Start menu, select the
programs folder, select Accessories, and
then select Notepad
• Saving source code in Notepad requires that
the Java source file be saved with a .java
extension
Using the DOS Prompt to
Compile Source Code
• Windows 95 and 98: Click Start, click Programs, and then
click MS-DOS Prompt
• Windows 2000: Click Start, click Programs, click
Accessories, and then click Command Prompt
• Windows XP: Click Start, click All Programs, click
Accessories, and then click Command Prompt
• At the command prompt, change from the default drive
prompt to the drive where your application is stored
• To compile an application, you type the javac command to
start the Java compiler