JAVA (NPRG013) LABS 2012/2013 Jaroslav Keznikl,

Slides:



Advertisements
Similar presentations
CS1020 Week 3: 29th January 2015.
Advertisements

Using Eclipse. Getting Started There are three ways to create a Java project: 1:Select File > New > Project, 2 Select the arrow of the button in the upper.
ENEE150: Discussion 1 Section 0104 Please Sit Down at a Computer and Login!
1 Introduction to UNIX Ke Liu
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Josh Goodwin
Java Programming (Chapter 1). Java Programming Classes, Types, and Objects.
Introduction to Java Lab CS110A – Lab Section 004 Instructor: Duo Wei.
Java Intro. A First Java Program //The Hello, World! program in Java public class Hello { public static void main(String[] args) { System.out.println("Hello,
Linux+ Guide to Linux Certification, Second Edition
CS 202 Computer Science II Lab Fall 2009 August 27.
CS1020: Intro Workshop. Topics CS1020Intro Workshop Login to UNIX operating system 2. …………………………………… 3. …………………………………… 4. …………………………………… 5. ……………………………………
Computer Science A 1: 3/2. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated.
1 Basics of Linux On linux machine: Login at your home directory Open a “shell” or “terminal” or “xterm” workspace (4) On windows machine Intall linux.
Introduction to Java.
CSCI S-1 Section 3. Deadlines for Homework 2 Problems 1-8 in Parts C and D – Friday, July 3, 17:00 EST Parts E and F – Tuesday, July 7, 17:00 EST.
Linux/Bash Commands Damian Gordon. ls List all the visible files in the current folder.
Editing Java programs with the BlueJ IDE. Working environments to develop (= write) programs There are 2 ways to develop (write) computer programs: 1.Using.
A Mini UNIX Tutorial. What’s UNIX?  An operating system run on many servers/workstations  Invented by AT&T Bell Labs in late 60’s  Currently there.
Using Macs and Unix Nancy Griffeth January 6, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis of Complex.
Introduction to Linux Operating System Tutorial 1
Java Programming Robert Chatley William Lee
8 Shell Programming Mauro Jaskelioff. Introduction Environment variables –How to use and assign them –Your PATH variable Introduction to shell programming.
Unix Basics Chapter 4.
2INC0 Operating Systems Introduction to Linux
File Permissions. What are the three categories of users that apply to file permissions? Owner (or user) Group All others (public, world, others)
Linux+ Guide to Linux Certification, Second Edition
CSCE 2013L: Lab 1 Overview  Java Basics The JVM Anatomy of a Java Program  Object-Oriented Programming Overview  Example: Payroll.java JDK Tools and.
CSCB07 TUT3 TA: Andrey Dyblenko Website:
Session 2 Wharton Summer Tech Camp Basic Unix. Agenda Cover basic UNIX commands and useful functions.
March 2, 2005Wah-kai Ngai1 Installation of Geant4 1st HK Simulation Meeting.
ENEE150 – 0202 ANDREW GOFFIN Introduction to ENEE150.
Introduction to UNIX Road Map: 1. UNIX Structure 2. Components of UNIX 3. Process Structure 4. Shell & Utility Programs 5. Using Files & Directories 6.
Programming Fundamentals 2: Simple/ F II Objectives – –give some simple examples of Java applications and one applet 2. Simple Java.
Lecture.1: Getting Started With Java Jiang (Jen) ZHENG May 9 th, 2005.
Basic Unix Commands CGS 3460, Lecture 6 Jan 23, 2006 Zhen Yang.
Unix Environment Input Output 2  List Content (ls) ◦ ls (list current directory) ◦ ls –all (include hidden files/folders)  Make directory (mkdir) ◦
Lecture One. Objective: Provide description of the Command-Line Editor of Linux operating system. Enable students to understand the practical side of.
22-July-2002cse142-13B-Development © 2002 University of Washington1 Development Tools CSE 142, Summer 2002 Computer Programming 1
1 CSE 390a Lecture 1 introduction to Linux/Unix environment slides created by Marty Stepp, modified by Jessica Miller & Ruth Anderson
CS252: Systems Programming Ninghui Li Slides by Prof. Gustavo Rodriguez-Rivera Topic 7: Unix Tools and Shell Scripts.
The assignment expressions. The assignment operator in an assignment statement We have seen the assignment statement: Effect: var = expr; Stores the value.
Arithmetic expressions containing Mathematical functions.
ENEE150: Discussion 1 Section 0104/0105 Please Sit Down at a Computer and Login!
Basic Unix Commands & GCC Saurav Karmakar Spring 2007.
AN INTRO TO UNIX/LINUX COMMANDS BY: JIAYANG WANG.
Linux A practical introduction. 1)Background and Getting Started Linux is an operating system with multiple providers Red Hat/CentOS (our version) Ubuntu.
A Brief Overview of Unix Brandon Bohrer. Topics What is Unix? – Quick introduction Documentation – Where to get it, how to use it Text Editors – Know.
EMT 2390L Lecture 3 Dr. Reyes Reference: The Linux Command Line, W.E. Shotts.
Learning basic Unix command It 325 operating system.
Computer Science A 1. Course plan Introduction to programming Basic concepts of typical programming languages. Tools: compiler, editor, integrated editor,
Unix Lab Fall Shell Scripting ●Through the shell (LXTerminal) you can: ●Run programs. ●Interact with the file system. ●Change settings. ●Send/receive.
ENEE150 Discussion 01 Section 0101 Adam Wang.
UNIX To do work for the class, you will be using the Unix operating system. Once connected to the system, you will be presented with a login screen. Once.
Andy Wang Object Oriented Programming in C++ COP 3330
The Command Prompt Commands are the way to “do things” in Unix
Useful Linux Commands.
introduction to Linux/Unix environment
CSE 390a Lecture 1 introduction to Linux/Unix environment
Java Intro.
CSE 390a Lecture 1 introduction to Linux/Unix environment
introduction to Linux/Unix environment
How to Run a Java Program
Andy Wang Object Oriented Programming in C++ COP 3330
introduction to Linux/Unix environment
introduction to Linux/Unix environment
Module 6 Working with Files and Directories
introduction to Linux/Unix environment
introduction to Linux/Unix environment
Lab 2: Terminal Basics.
introduction to Linux/Unix environment
Presentation transcript:

JAVA (NPRG013) LABS 2012/2013 Jaroslav Keznikl,

BASIC INFORMATION Course website “Grupík” module in SIS Jaroslav Keznikl,

CREDIT CONDITIONS Attendance (max 3 absences) Elsewise an extra homework One obligatory homework Final “project” Topic due at Nov. 14 th 2012 Finalized preferably till the end of February Hard deadline May 24 th :00 (end of summer semester) Final test Details on the course website Jaroslav Keznikl,

GUIDELINES Basic Java info package = a directory with a particular structure, containing source files classpath = list of directories, where to look for packages -cp, CLASSPATH environment variable public static void main(String args) { … } System.exit(int retval) System.out.println(…) print(…), printf(…) Jaroslav Keznikl,

GUIDELINES 2 Basic shell commands (bash, …) man – manual pages mkdir – create a directory -p creates also the non-existing parent directories cd – change directory ls [-a, -l] – list directory contents rm [-r-f] – delete a file/directory [recursively] export CLASSPATH = “…” Sets the CLASSPATH environment variable Unix at MS home vs home/BIG cp –r.gnome BIG/.gnome ln –s BIG/.gnome Editor vim/gvim, gedit (Gnome), kwrite (KDE), … Java tools java – runtime javac – compiler Jaroslav Keznikl,

GUIDELINES 3 Basic procedure // create a directory structure for the project & package mkdir -p project/src/cz/cuni/mff/keznikl // implement stuff gvim project/src/cz/cuni/mff/keznikl/Test.java // compile (creates Test.class) javac project/src/cz/cuni/mff/keznikl/Test.java // run it java –cp project/src cz.cuni.mff.Test Implementation package cz.cuni.mff.keznikl; public class Test { public static void main(String[] args) {... } } Jaroslav Keznikl,

ASSIGNMENT 1 Program Hello World Use your own package (not the default=“” one) Jaroslav Keznikl,

ASSIGNMENT 2 An application that uses a class from a different project/package 2 projects hello, library src directory for source files /…/home/…/projects/hello/src/ /…/home/…/projects/library/src/ Project library package: org.company.library contains class Printer static method print(String msg) Project hello package: cz.cuni.mff.example method main Prints “Hello world” using the Printer class Jaroslav Keznikl,

ASSIGNMENT 3,4 Assignment 3 Create a program, which prints out all its arguments from the command line. Assignment 4 Create a program, which prints out a multiplication table for numbers 1-10 Jaroslav Keznikl,