FileHint

.java

Use caution

Java source code

Source for the Java language. Compiles to `.class` bytecode that runs on the JVM.

MIME types

  • text/x-java-source

Category

code

What opens this file

  • javac / java
  • IntelliJ IDEA
  • Eclipse
  • VS Code + Java extension

How to open by OS

Windows

  • JDK 17+ recommended, IntelliJ IDEA.

Mac

  • Homebrew's `openjdk`, IntelliJ IDEA.

Linux

  • Distribution OpenJDK.

Ios

  • None.

Android

  • Android Studio (Kotlin-first but Java is supported).

Safety notes

  • Ecosystem-wide supply-chain bugs like Log4Shell (CVE-2021-44228) happen. Stay on top of dependency updates.
  • Java serialization via ObjectInputStream is a RCE class weakness. Disable readObject paths where possible.

Common mistakes

  • LTS jumps (11 → 17 → 21) break subtle APIs. Keep java -version and CI JDK aligned.
  • Maven / Gradle snapshot dependencies destabilise production — pin to release tags.

Related extensions

References