javac.exe

Java Compiler (javac) - part of the JDK

Application ProcessSafeJava Development Tools
CPU Usage
5-40%
Memory
20-180 MB
Location
C:\Program Files\Java\jdk-19.0.2\bin
Publisher
Oracle Corporation

Quick Answer

javac.exe is safe. It's the official Java compiler from Oracle/OpenJDK used to translate Java source into bytecode during builds.

Is it a Virus?
 NO - Safe
Must be in C:\Program Files\Java\jdk-XX\bin or C:\Program Files (x86)\Java\jdk-XX\bin
Warning
Many processes normal
javac.exe may spawn sub-processes for annotation processing or helper tools during compilation
Can I Disable?
 YES
You can refrain from invoking javac by not building Java projects or by using incremental builds with your IDE

What is javac.exe?

javac.exe is the Java compiler in the JDK that translates Java source files (.java) into bytecode (.class) for the Java Virtual Machine. It is launched by developers, IDEs, or build tools to compile one or more files or entire projects, typically while respecting classpaths and source compatibility.

This compiler runs as its own process, reads source files, applies Java language rules, and emits class files. It supports annotation processing, source/target compatibility settings, and can be invoked incrementally by modern build systems.

Quick Fact: javac.exe supports incremental compilation and annotation processing introduced in newer JDKs to speed up builds.

Types of Javac Processes

Is javac.exe Safe?

Yes, javac.exe is safe when it is the legitimate file from Oracle or OpenJDK downloaded from official sources (oracle.com or openjdk.java.net).

Is javac.exe a Virus or Malware?

The real javac.exe is NOT a virus. Malware may mimic names, but genuine javac.exe comes from a trusted JDK distribution.

How to Tell if javac.exe is Legitimate or Malware

  1. File Location:: Must be in C:\Program Files\Java\jdk-XX\bin\javac.exe or C:\Program Files (x86)\Java\jdk-XX\bin\javac.exe. Any javac.exe elsewhere is suspicious.
  2. Digital Signature:: Right-click javac.exe -> Properties -> Digital Signatures. Should show a signature from Oracle Corporation or an OpenJDK signer.
  3. Version and Signature Consistency:: Run javac -version to verify the version matches your installed JDK; verify the binary matches the installer package.
  4. Behavior:: Javac should only run during compilation tasks started by your IDE/build tools; persistent background execution is unusual.

Red Flags: If javac.exe is located outside a Java Development Kit directory (e.g., in Temp, AppData, or System32), runs without an active Java build, lacks a valid digital signature, or consumes resources constantly, scan with antivirus and verify your Java installation.

Why Is javac.exe Running on My PC?

javac.exe runs when you compile Java sources or when a build tool invokes the compiler as part of a project build.

Reasons it's running:

Can I Disable or Remove javac.exe?

Yes, you can stop it by not compiling or uninstalling the JDK. If you do not need Java development tools, removing the JDK or altering PATH will prevent javac.exe from launching.

How to Stop javac.exe

How to Uninstall Java JDK

Common Problems: High CPU or Memory Usage

If javac.exe is consuming excessive resources during builds:

Common Causes & Solutions

Quick Fixes:
1. Quick Fixes:
2. 1. Use the IDE's task manager or the command line to cancel long-running builds
3. Close unused editors and reduce open modules to lower compile scope
4. Update to latest JDK and ensure PATH points to the correct bin
5. Check for annotation processors and disable unnecessary ones
6. Enable parallel builds carefully and monitor with task manager

Frequently Asked Questions

What is javac.exe?

javac.exe is the Java compiler included in the JDK. It compiles Java source files (.java) into bytecode (.class) that the JVM runs.

Why does javac.exe run when I compile?

Because your IDE or build tool invokes the Java compiler as part of the build process to translate source into executable bytecode.

Where is javac.exe located?

Typically in the JDK bin folder, e.g., C:\Program Files\Java\jdk-XX.X.X\bin\javac.exe or C:\Program Files (x86)\Java\jdk-XX.X.X\bin\javac.exe.

How do I set JAVA_HOME correctly?

Set JAVA_HOME to the JDK root directory (e.g., C:\Program Files\Java\jdk-19.0.2) and add %JAVA_HOME%\bin to PATH.

Can I run javac without installing the JDK?

No. javac is part of the JDK. You need a JDK installation to compile Java sources; a JRE only runs Java programs.

How can I speed up compilation?

Use incremental builds, enable parallel builds in your build tool, ensure annotation processors are necessary, and upgrade to a recent JDK for performance improvements.

Related Processes