PGoCareerGoCareer prep tools
Home
LoginSign up
  • Java
  • Python
  • AI
  • React
  • Angular
  • PHP
  • Node.js
  • SQL
  • DSA
  • HTML
  • CSS
  • JS
  • Spring
  • ML
  • MongoDB

Java · Theory

Program Internal

← All stacks

Theory

6/270

Program Internal

You write a .java file in plain text. javac compiles it into a .class file. That file holds bytecode, not a Windows .exe. Bytecode is for the JVM, not for one operating system.

When you run the program, ClassLoader brings the .class into the JVM. A verifier checks it is not unsafe. Then JVM starts at main. Often JIT makes hot parts faster after they run many times.

Remember the chain and say it out loud: .java → javac → .class → JVM → output. Same .class can run on another OS if JVM is installed.

Let's take this on the board with one tiny Main class — no extra files. Program Internal — reads JVM properties — proves your runtime is available. Start from main, go line by line, and stop at each print. That output is the proof for Program Internal.

Diagram
Main.java
      │ javac
      ▼
  Main.class  (bytecode)
      │ ClassLoader + verifier
      ▼
     JVM  →  main()
      │ JIT (hot code faster)
      ▼
   output
Exam tip

Say the chain: source → bytecode → JVM → run. Then add: not an .exe.

Example

// JVM / runtime info
public class Main {
  public static void main(String[] args) {
    System.out.println("java.version = " + System.getProperty("java.version"));
    System.out.println("java.home = " + System.getProperty("java.home"));
    System.out.println("os.name = " + System.getProperty("os.name"));
  }
}

Program Internal — reads JVM properties — proves your runtime is available.

Short notes

  • DefYou write .java. javac makes .class bytecode. JVM runs it.
  • Flow.java → javac → .class → JVM → output.
  • Remember.class is not a Windows .exe. Same file can run on another OS.
  • RuleClassLoader loads the class. Verifier checks it. Then main runs.

Questions

1

What does javac produce?

2

Who runs bytecode?

3

Is a .class an .exe?

Previous← Java Hello World ProgramNextHow to set path in Java →
P

GoCareerGo

Utilities · Preparation Hub · Resume · CV · Tools — one workspace.

Workspace

DashboardProfilePreparation HubResume builderCV builderCareer planning

PDF Tools

Merge PDFSplit PDFCompress PDFImage to PDFAll toolsJobs

Image & QR

Compress ImageResize ImageQR ScannerQR GeneratorBlogIT interview prep

Company

FAQFeedbackContactPrivacyTermsSitemap

© 2026 GoCareerGo. Keep moving forward.