COMPUTER PROGRAMMING 1401101-4
LAB#1
Dr. Asmaa Alayed
1
PART#1 HOW TO INSTALL NetBeans 8.2
2
FIRST: DOWNLOAD JDK8
Follow this link:
http://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html
3
1.
2.
4
5
SECOND: DOWNLOAD Netbeans 1. You can download it from the link:
https://netbeans.org/downloads/
6
2. Choose OS
3. Then, press Download
7
4.
8
5.
9
6.
10
7.
11
8.
12
9.
13
14
CREATION OF A NEW PROJECT
File New Project
CREATION OF A NEW PROJECT
15
Choose Java, then Java Application
Press Next
CREATION OF A NEW PROJECT
16
Then, press Finish Now, Write your project name
and specify its location
CREATION OF A NEW PROJECT
17
Now, you have your new project
MAIN COMPONENTS OF A NEW PROJECT WINDOW
18
The Project Window
The Navigator Window
The Source Editor Window
MAIN COMPONENTS OF A NEW PROJECT WINDOW
19
The Project Window: contains a tree view of the components of the project, including source files, libraries that your code depends on.
The Source Editor Window: with a file called FirstProgram.java
The Navigator Window: to navigate between elements within the selected class.
Now, Make your Program Prints “This Is My First Program”
20
Save Your Program (File Save)
21
Compile Your Program (Run Compile F9)
22
Run Your Program (Run Run Project F6)
23
Your program output appears here 24
25
Error in this line
Error in the following section or block
There is an error in the program
How to locate your compilation errors?
PART#2 EXPORT & IMPORT JAVA PROJECTS
26
EXPORT JAVA PROJECTS
27
1. Select a project to export
2. File Export Project Zip
3. From Browse, choose location to export your project to, and enter a
project name 5. Press Export
IMPORT JAVA PROJECTS
28
2. Select a project to import 1. File Import Project From Zip
3. Press Import
PART#3 WRITING FIRST JAVA PROGRAMS
29
Don’t forget to start all of your programs with:
/*
Name:
ID:
GROUP:
Lab#
*/
30
EXERCISE#1
Using Escape Sequences, Write a program to print your NAME,
UNIVERSITY, MAJOR on the screen. The output will be as the following:
31