oop lecture4

8
More concepts in OOP Lecture 4 Object Oriented Programming Eastern University, Dhaka Md. Raihan Kibria

Upload: shahriar-robbani

Post on 26-May-2015

96 views

Category:

Education


0 download

TRANSCRIPT

Page 1: Oop lecture4

More concepts in OOPLecture 4

Object Oriented ProgrammingEastern University, Dhaka

Md. Raihan Kibria

Page 2: Oop lecture4

Classpath

Classpath is a reference which needs to be provided to JRE/JVM to run classes

The reference indicates the location where the classes are to be found

Classpath is to be given as a switch to “java” command

Page 3: Oop lecture4

Example

java -cp c:\temp B This means the class B is to be found

under c:\temp folder The above command can be issued from

any folder

Suppose B is under com package and com folder is under c:\temp

To run B, issue command: java -cp c:\temp com.B

Page 4: Oop lecture4

Example

B.java was under c:\temp\com folder. The package declaration for B.java was

like: package com;

Page 5: Oop lecture4

Installing and using JDK

www.oracle.com/technetwork/java/javase/downloads/index.html

Install by clicking the exe.

Check if java command works in command line:

java -version

Page 6: Oop lecture4

Installing and using JDK

Common issues: java command not found: check that

jdk/bin is referenced to under path

Page 7: Oop lecture4

Tools that make you productive

IDE: Integrated development envionment Example:

– Eclipse, Netbeans, IntelliJ

Page 8: Oop lecture4

Strengths and Advantages

Summarize the special features and advantages of the product being introduced