oop lecture4
TRANSCRIPT
More concepts in OOPLecture 4
Object Oriented ProgrammingEastern University, Dhaka
Md. Raihan Kibria
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
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
Example
B.java was under c:\temp\com folder. The package declaration for B.java was
like: package com;
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
Installing and using JDK
Common issues: java command not found: check that
jdk/bin is referenced to under path
Tools that make you productive
IDE: Integrated development envionment Example:
– Eclipse, Netbeans, IntelliJ
Strengths and Advantages
Summarize the special features and advantages of the product being introduced