Computer Science A, 1

Download Report

Transcript Computer Science A, 1

Computer Science A 5: 17/2
JCreator
IDE: Integrated Development Editor
Features:
• Compile and run from editor
• Manage multiple files
• Can look up api documentation
• Selective hiding of parts of the code
JCreator LE (light edition) is free
Workspace
Concepts:
• Workspace: the editor window. A
workspace may have several projects.
• A project: a java program. A project may
consist of several java files.
• A file. A single java file. A file may contain
several classes.
Workspace
Make a java program
• Create a new workspace
• Create a project – give it a name, specify
where to save its files, and a type (Basic
Java application).
• It generates a ”*.java” file
• Click on the java file
• Replace the body of the main method to
System.out.println(”Hello”);
Compile and run
• Compile (called ”build”): F7
• Run (”execute”): F5
• If there were errors click on red cross in ”Build
output” and the line is marked in the program.
• Click on ”System” in ”System.out….”
• Press ”Ctrl-F1” and you will get context-sensitive
help
• You may need to specify path to compiler
anddocumentation
Editor features
Word completion: ”ctrl-space”
Match bracket, parentheses: ”ctrl-egu”
Hide imports, comments, method body, class
content.
’ctrl-f1’ on classes to get api-documentation
’ctrl-f1’ on method name to list methods