Java Programming Unit 1. Your first Java Program Eclipse IDE



Similar documents
How to use the Eclipse IDE for Java Application Development

Java with Eclipse: Setup & Getting Started

Fahim Uddin 1. Java SDK

Java Software Development Kit (JDK 5.0 Update 14) Installation Step by Step Instructions

A Short Introduction to Writing Java Code. Zoltán Majó

Introduction to Java

Installing Java (Windows) and Writing your First Program

Android Development Setup [Revision Date: 02/16/11]

Android Programming: Installation, Setup, and Getting Started

Getting Started with Android Development

Installing Java. Table of contents

How To Run A Hello World On Android (Jdk) On A Microsoft Ds.Io (Windows) Or Android Or Android On A Pc Or Android 4 (

Installing the Android SDK

The "Eclipse Classic" version is recommended. Otherwise, a Java or RCP version of Eclipse is recommended.

A Java Crib Sheet. First: Find the Command Line

Android Environment SDK

Android Environment SDK

Home Course Catalog Schedule Pricing & Savings Training Options Resources About Us

Appendix A Using the Java Compiler

Java Crash Course Part I

Eclipse installation, configuration and operation

How to Install Java onto your system

Install Java Development Kit (JDK) 1.8

Application Development Setup Guide

Download and Installation Instructions. Android SDK and Android Development Tools (ADT)

Installing (1.8.7) 9/2/ Installing jgrasp

OpenCV on Android Platforms

Epidefender Studio Installation notice

LAB 1. Familiarization of Rational Rose Environment And UML for small Java Application Development

1) SETUP ANDROID STUDIO

Setting Up Your Android Development Environment. For Mac OS X (10.6.8) v1.0. By GoNorthWest. 3 April 2012

How to build your first Android Application in Windows

Download and Installation Instructions. Android SDK and Android Development Tools (ADT) Microsoft Windows

With a single download, the ADT Bundle includes everything you need to begin developing apps:

WA1826 Designing Cloud Computing Solutions. Classroom Setup Guide. Web Age Solutions Inc. Copyright Web Age Solutions Inc. 1

IBM TRIRIGA Anywhere Version 10 Release 4. Installing a development environment

Hello World. by Elliot Khazon

Advantages. manage port forwarding, set breakpoints, and view thread and process information directly

LAB4 Making Classes and Objects

Android Development. 吳 俊 興 國 立 高 雄 大 學 資 訊 工 程 學 系

Android: Setup Hello, World: Android Edition. due by noon ET on Wed 2/22. Ingredients.

Selenium Automation set up with TestNG and Eclipse- A Beginners Guide

1001ICT Introduction To Programming Lecture Notes

J2EE-Application Server

How to Create an Android Application using Eclipse on Windows 7

2011 Marty Hall An Overview of Servlet & JSP Technology Customized Java EE Training:

System.out.println("\nEnter Product Number 1-5 (0 to stop and view summary) :

Supplement I.B: Installing and Configuring JDK 1.6

Installing C++ compiler for CSc212 Data Structures

Android 4.4 App Development Essentials

Netbeans IDE Tutorial for using the Weka API

An Overview of Servlet & JSP Technology

Tutorial: Getting Started

Manual For Using the NetBeans IDE

Java CPD (I) Frans Coenen Department of Computer Science

CS 170 Java Programming 1. Welcome to CS 170. All about CS 170 The CS 170 Online Materials Java Mechanics: Your First Program

New Technology Introduction: Android Studio with PushBot

Download and Installation Instructions. Android SDK and Android Development Tools (ADT) Microsoft Windows

How to Set Up Your PC for Android Application Development

Java Language Tools COPYRIGHTED MATERIAL. Part 1. In this part...

Offline Android Installer

IRF2000 IWL3000 SRC1000 Application Note - Develop your own Apps with OSGi - getting started

INTRODUCTION TO JAVA PROGRAMMING LANGUAGE

SETTING UP YOUR JAVA DEVELOPER ENVIRONMENT

EVALUATION ONLY. WA2088 WebSphere Application Server 8.5 Administration on Windows. Student Labs. Web Age Solutions Inc.

3. Installation and Configuration. 3.1 Java Development Kit (JDK)

Installing IBM WDT with Web Development Extension for Power Systems Software

What servlets and JSP are all about

Server Setup and Configuration

Virtual Machine (VM) For Hadoop Training

JDK 1.5 Updates for Introduction to Java Programming with SUN ONE Studio 4

Java applets. SwIG Jing He

Setting Up a Windows Virtual Machine for SANS FOR526

Download and Installation Instructions. Java JDK Software for Windows

Mobile application development J2ME U N I T I I

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Google App Engine f r o r J av a a v a (G ( AE A / E J / )

IDS 561 Big data analytics Assignment 1

Introduction to Gear VR Development in Unity APPENDIX A: SETUP (MAC OS X)

Creating a Java application using Perfect Developer and the Java Develo...

Building OWASP ZAP Using Eclipse IDE

WA Continuous Integration with Jenkins- CI, Maven and Nexus. Classroom Setup Guide. Web Age Solutions Inc. Web Age Solutions Inc.

How To Develop An Android App On An Android Device

Oracle Java SE and Oracle Java Embedded Products

Hadoop Tutorial. General Instructions

How to Set Up Your PC for Android Application Development

About this Release. Introduction. Prerequisites. Installation. Using the Web SDK Packager

Java TM Programming for Kids, Parents and GrandParents. Yakov Fain

Supplement I.B: Installing and Configuring JDK 1.6

Introduction to Eclipse

Creating Web Services Applications with IntelliJ IDEA

Setting up Sudoku example on Android Studio

Basic Android Setup Windows Version

POOSL IDE Installation Manual

Configuring the BBj Jetty Web Server (rev10.02) for OSAS

CSE 452: Programming Languages. Acknowledgements. Contents. Java and its Evolution

Reminders. Lab opens from today. Many students want to use the extra I/O pins on

Primavera P6 Professional Windows 8 Installation Instructions. Primavera P6. Installation Instructions. For Windows 8 Users

CSA Software Listing Table of Contents. Both Windows and Mac platforms are supported.

Data Structures Lecture 1

Transcription:

Java Programming Unit 1 Your first Java Program Eclipse IDE

During this training course we ll use the textbook Java Programming 24- Hour Trainer by Yakov Fain.

Why Learn Java? Large code base of already wrisen applicatons 9 million of professional Java developers Lots of enterprise applicatons were developed and are being developed in Java As per Tiobe index hsp://bit.ly/rite Java remains one of the most popular languages. The same program can run on different plazorms Mobile Android development is done in Java

JDK and JRE Java Development Kit (JDK) is required to develop and run programs Java RunTme Environment (JRE) is required to run programs. Users must have JRE installed, developers JDK JDK includes JRE

Java SE and Java EE Java SE: Java Standard EdiTon Java EE: Java Enterprise EdiTon (a.k.a. J2EE) Java EE includes a set of technologies built on top of Java SE: Servlets, JSP, JSF, EJB, JMS, et al. All Java programs run inside the Java Virtual Machine (JVM)

Installing JDK on Windows Just press the busons Next or ConTnue to complete the install. The at the end, JavaFX 2 will be also installed, which won t be covered in this training.

TesTng the installaton Add the bin folder to the PATH system variable of your computer (for details see hsp://java.com/en/download/help/path.xml). Make sure that the newly installed version is being used. Open Command (or Terminal on MAC) window and type the following: java - version

Walkthrough 1 1. Download Java SE 7 (Currently JDK 7 u40 update 40) from hsp://www.oracle.com/technetwork/java/javase/downloads Download JDK, not JRE. In Windows, download the X86 version of Java. 2. Install Java SE (for details, see Lesson 1 of the textbook). To install Java SE 7 on MAC computers download the JDK dmg file from hsp://jdk7.java.net/download.html, run it and follow the instructons. 3. If aler typing java version in the Command window (Terminal window on MAC OS)- the reported version should be 1.7. If not, you may need to modify the system variable PATH to include the bin directory of JDK. JDK 8 will be released in October of 2013.

Three steps to run the Java program Write the program and save it in a file with the name that ends with.java, for example HelloWorld.java Compile the program using javac compiler, e.g. javac HelloWorld.java This will create a file HelloWorld.class Run your program: java HelloWorld

Compiling and running HelloWorld

HelloWorld.java public class HelloWorld {!! public static void main(string[] args){! System.out.println( Hello World );! }! }! In Java, you start with creatng a class. Our class is called HelloWorld. A class can have methods. In this case it s called main() You can run the class as a program if it has a method with the following signature public static void main(string[] args)!

Walkthrough 2 Create a directory called Prac-calJava and a subdirectory Lesson1. Open a plain text editor, e.g. Notepad, enter the text of the HelloWorld program from previous slidw and save it as HelloWorld.java in the directory Lesson1. Open the command window, change the directory to Lesson1 using the cd command. Compile (javac) and run (java) HelloWorld program it has to print HelloWorld on the screen.

Eclipse IDE Integrated Development Environment (IDE) makes your work more productve Includes text editor, compiler, debugger, context- sensitve help, works with different Java SDKs Eclipse is the most widely used IDE AlternaTves: IntelliJ IDEA (JetBrains), NetBeans (Oracle)

Eclipse IDE Eclipse for Java EE Developers comes with a number of plugins that will be used in second half of this course. The latest version of Eclipse IDE is called Kepler. Eclipse is also a plazorm for plugin development additonal features simplifying programming.

Walkthrough 3 Download and install the latest Eclipse for Java EE (32 Bit version) from hsp://www.eclipse.org/downloads. To install Eclipse simply unzip the content of the archive file you downloaded. To start Eclipse, double- click on Eclipse.exe (or Eclipse.app on MAC). Create a new Java project named Hello by using the menu File New (see Lesson 2 in the textbook for details). Create a new Java class named HelloWorld and enter the code from LisTng 1-1 of the textbook. Press Control- S to save and compile the code. Run the program right- click on HelloWorld and select the Run As menu item.

Homework 1. Write a program that will print your name and address in the Console view of Eclipse, for example: Alex Johnson 23 Main Street New York, NY 10001 USA import java.utl.scanner; public class FriendsAndFamily { public statc void main(string[] args) { 2. Study all materials from Lesson 1 and 2 from the textbook 3. Create a new project in Eclipse called Sale 4. Enter, compile, and run the program FriendsAndFamily. Try to guess, how this program works. 5. Study Eclipse tutorial at hsp://bit.ly/ejscx } Scanner input= new Scanner(System.in); do { System.out.println("\n Enter list price: " ); double listprice = input.nextdouble(); System.out.println(" Enter discount %: " ); int discount = input.nextint(); System.out.prinZ(" You'll pay only $%2.2f", listprice listprice*discount/100); } while (true); }

AddiTonal Read How to study online (the original, in Russian): hsp://www.stratoplan.ru/lib/break- the- ice/ The English translaton done by Google Translate: hsp://bit.ly/10lxgrh Eclipse IDE Workbench User Guide: hsp://help.eclipse.org/kepler/index.jsp