Java Programming: Getting Started
description
Transcript of Java Programming: Getting Started
![Page 1: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/1.jpg)
Java Programming:Getting Started
Marlene Galea
![Page 2: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/2.jpg)
Marlene Galea
The JDK (Java Development Kit)
An IDE (Integrated Development Environment)
◦ Different IDEs include: JCreator NetBeans BlueJ
What you will need
We will be using BlueJ
![Page 3: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/3.jpg)
Marlene GaleaMarlene Galea – HoD Computing
What is the JDK?Java Development Kit (JDK)
Compiler Debugger
Other tools
Java Runtime Environment (JRE)
Java platform core classes
Supporting Java platform
libraries
Java Virtual Machine (JVM)
Integrated Development Environment (IDE)
![Page 4: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/4.jpg)
Marlene GaleaMarlene Galea – HoD Computing
What is the JDK?Java Development Kit (JDK)
Compiler Debugger
Other tools
Java Runtime Environment (JRE)
Java platform core classes
Supporting Java platform
libraries
A JDK includes the JRE, compiler, debugger and other tools for developing applets and applications.
The JRE is what you get when you download Java software. The JRE is the runtime portion of Java software.
Java Virtual Machine (JVM)
The JVM is software that converts the Java intermediate language
(bytecode) into machine language and executes it.
Integrated Development Environment (IDE)
An IDE e.g. NetBeans is used to edit, compile and debug Java code.
![Page 5: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/5.jpg)
Marlene Galea
Go to http://www.bluej.org/ and download BlueJ
You may use the JDK and BlueJ combined installer (or you may download the JDKseparately – see here)
Getting an IDE (BlueJ)
![Page 6: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/6.jpg)
Using BlueJCreating and running your application
![Page 7: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/7.jpg)
Marlene Galea
Select ‘New Project’ from the ‘Project’ Menu
Starting a new project
![Page 8: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/8.jpg)
Marlene Galea
Choose where to save your new folder. Hit the ‘Create’ button.
Create your Project
![Page 9: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/9.jpg)
Marlene Galea
Select ‘New Class’ Name your class and press ‘OK’
Starting a New Class
![Page 10: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/10.jpg)
Marlene Galea
Double-click your class to write your code
Coding your class
![Page 11: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/11.jpg)
Marlene Galea
Once you’ve written some code, hit ‘Compile’.
Writing and Compiling your class
![Page 12: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/12.jpg)
Marlene Galea
Right-click on the class holding the method ‘main’.
Select and click method ‘main’ to run.
Running your program
![Page 13: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/13.jpg)
Marlene Galea
Select ‘Create JAR File’ from the Project Menu.
Creating an executable file
![Page 14: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/14.jpg)
JDK DownloadIf you want to ONLY download the JDK, follow the following steps.
![Page 15: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/15.jpg)
Marlene Galea
Click this link to go to the Oracle page from where you can download the JDK
Select ‘Download Java’ as shown:
Downloading the JDK
![Page 16: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/16.jpg)
Marlene Galea
Accept Licence Agreement Select the product for your system
Downloading the JDK [...cntd]
![Page 17: Java Programming: Getting Started](https://reader031.fdocuments.net/reader031/viewer/2022020102/56816930550346895de079f3/html5/thumbnails/17.jpg)
Marlene Galea
Happy Coding!