![]() | Java Programming |
Chapter 01: Development Tools– Alice 3: A 3D environment for creating animations. – Greenfoot: An interactive 2D environment for creating games. – Eclipse: A popular environment for Java application development. As a developer, you will use Alice, Greenfoot, and Eclipse, which are Integrated Development Environment s (IDEs), to create Java applications. An Integrated Development Environment, referred to as simply “IDE”, is a software programming tool used by computer programmers to develop software applications. An IDE includes tools for writing, editing, compiling, deploying and debugging programs. Java JRE and Java JDK • Differences between Java JRE and Java JDK: – Java Runtime Environment (JRE) contains only the necessary functionality to start Java programs, such as Internet applications. – Java Development Kit (JDK) contains functionality to start Java programs as well as develop them. – At a minimum, the Java JRE is required to run Eclipse. – Eclipse was created by an Open Source community. – The Eclipse project is governed by the Eclipse Foundation, a non-profit organization. – Eclipse requires an installed Java Runtime Environment (JRE). – Eclipse contains its own development tools, i.e., a Java compiler. https://www.eclipse.org/downloads/ The Workspace• All projects are developed and modified in a workspace.• A workspace is a collection of Projects. • In this course, you may use the same workspace for all practice projects and packages. • A project is a way for programmers to organize Java files. • A package is how Java and Eclipse organize Java files that are related. • Using packages will ensure that related files can find each other. High-Level Steps to Create a Program in Eclipse • Create a Project. • Create a Package (inside the src folder of the project). • Create Class(es) inside the package. – At least one of the classes must contain a main method. This class is called the Driver class. • Compile the Java code. This creates a .class file. • Run the Java code from the Driver class. Checking JavaCheck for Java on Your Computer • To verify that Java is already installed on your computer:• Windows or Linux operating systems: – Enter java -version in a command window. • Mac operating system: – Use the Software Update option from the Apple menu. Environnements d’exécution Java Les trois principaux environnements d’exécution Java (frameworks en anglais) sont les applications , les applets et les servlets . Chaque environnement utilise une catégorie de classe et un point d’entrée différents ; le point d’entrée d’un programme est la méthode appelée par la JVM pour exécuter un programme |