Transcript IDEs

IDEs
Department of Information Systems
and Computer Science
Ateneo de Manila University
Overview



What is an IDE?
Why use an IDE?
Familiarization with different IDEs


6/19/2005
JCreator
BlueJ
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 2
What is an IDE?

“Integrated Development Environment”





source code editor,
a compiler and/or interpreter,
build-automation tools,
and (usually) a debugger
Allows you to create, edit, compile and run
programs written in a particular language, e.g.
Java

6/19/2005
Some IDEs can support more than one language
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 3
What is an IDE?

Some have other features that aid in
developing better programs:




6/19/2005
Debugging
Test cases
Code formatting (colored keywords, etc.)
Etc.
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 4
Why use an IDE?



Easier to code because of colored text
Makes it easier to develop programs, so
you can focus more on the coding
Contains features to make debugging and
writing programs easier
6/19/2005
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 5
Different IDEs for Java







JCreator
BlueJ
Eclipse
Visual Café
Java NetBeans
Visual Studio
…and many more!
6/19/2005
These are what we will
use this semester.
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 6
6/19/2005
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 7
JCreator


A small, lightweight IDE developed by the
Xinox Software.
Two licenses available:



Lite edition - Freeware (limited features)
Pro edition - Shareware (requires payment, but
with full features)
Download from http://www.jcreator.com
6/19/2005
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 8
JCreator



Allows you to create/edit single programs.
Project – Contains java sources and other files
needed for your applications and applets.
Workspace – container of projects; a workspace
can contain multiple projects but it is not
uncommon to have a single-project workspace.
6/19/2005
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 9
Using JCreator for the first
time…
You might have to configure two things:

1.
Where Java is installed.

2.
usually in C:\Program Files\Java\jdk1.5.0_06\
Where the Java documentation is found.

If unzipped, usually found in C:\Program
Files\Java\jdk1.5.0_06\docs\
If you have to reconfigure these, it is
usually found on the menu bar:


6/19/2005
ConfigureOptionsJDK Profiles
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 10
Default project directory

It is also helpful to set the default project
directory so you know where your files land


If you don’t set it, it will be in a folder under
“Program Files\Xinox Software\JCreatorC3LE”
Better to create the folder where you want your
Java projects to reside and then set the default
directory to that folder

6/19/2005
Configure -> Options -> Directories
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 11
Familiarization with JCreator

Create, compile and execute a java project:





Name the project HelloWorld
(start with an empty project)
Add a single file to the project called Hello.java
Type in the Hello.java code from before (try multiple
System.out.println statements this time)
Compile and execute (Shortcuts: F7 and F5)
Experiment with IDE features

6/19/2005
See how it deals with compile errors
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 12
“Project-less” compilation


You can also create/open a Java file in
JCreator and compile it directly
(even if it is not part of a project)
Example



6/19/2005
Download HelloYouWithFrame.java
Open it using JCreator
Compile and execute
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 13
BlueJ
6/19/2005
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 14
BlueJ





Another IDE, but written in Java
First developed by University of Kent
Download from http://www.bluej.org
Ideal for first-time programmers
Features include the debugger, test runs,
etc.
6/19/2005
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 15
BlueJ


Allows you to start programming right
away, focusing on object fields and
methods, and less on syntax
Allows you to see objects in action

6/19/2005
shows you how classes are related through
boxes and lines
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 16
Using BlueJ for the first time

You will also have to specify where your
Java executable is located
Usually at
C:\Program Files\Java\jdk1.5.0_06\bin\java.exe


Then, create/open a BlueJ project

6/19/2005
Note: Non-BlueJ folders containing Java files
will have to be converted to a BlueJ project.
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 17
Familiarization with BlueJ

Again, create, compile and execute a
HelloWorld application



Make sure there are multiple println
statements in the Java class so that you can
try out the debugger later
Execute by right-clicking on the Java class icon
and executing main
Try out the debugger

6/19/2005
Set a breakpoint and execute the Java class
Copyright 2005, by the authors of these slides, and Ateneo de
Manila University. All rights reserved.
L2: IDEs
Slide 18