Ecosystem Interactions Class Discussion Presentation in Blue Green Lined Styl...
Oop lecture4
1. Lecture 4
More concepts in OOP
Object Oriented Programming
Eastern University, Dhaka
Md. Raihan Kibria
2. 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
3. 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
4. Example
B.java was under c:tempcom folder.
The package declaration for B.java was
like: package com;
5. Installing and using JDK
www.oracle.com/technetwork/java/javase/dow
nloads/index.html
Install by clicking the exe.
Check if java command works in command
line:
java -version
6. Installing and using JDK
Common issues:
java command not found: check that
jdk/bin is referenced to under path
7. Tools that make you productive
IDE: Integrated development envionment
Example:
– Eclipse, Netbeans, IntelliJ