Introduction to Java and Class Path
Introduction to Java and Class Path
Hello friends, welcome to our channel. In today's session, Im going to discuss Java programming specifically
To begin with, well understand the basic terminologies used in Java and how Java programs are executed.
The software used to run Java applications is called JDK, which stands for Java Development Kit. This JDK
1. Java Compiler
When we write a Java program, the Java Compiler compiles it and generates a .class file, also called
bytecode. This bytecode is then given to the JRE, which includes the JVM (Java Virtual Machine).
In comparison to C language, where after compilation the object code is directly executed by the operating
system, in Java, the bytecode is executed by the JVM not directly by the operating system.
Each operating system (like Windows, Linux, or Mac OS) has its own JVM, which means JVM is
OS-dependent, but the bytecode remains the same. So, the output is platform-independent, even though
- The compiler compiles the .java file into a .class file (bytecode).
Page 1
Introduction to Java & Class Path
javac filename.java
java filename
Before writing and running Java programs, we must set the path so we can execute Java commands from
Page 2
Introduction to Java & Class Path
- In Variable Value, paste the Java installation path (e.g., C:\Program Files\Java\jdk1.8.0\bin) without quotes.
- How to set the class path using both command line and GUI methods
Hope you understood the basic concepts and how to set up your system for Java programming. If you found
this helpful, please like and share the video, and dont forget to subscribe to the channel. Thank you for
watching!
Page 3