.java
Use cautionJava 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
ObjectInputStreamis a RCE class weakness. DisablereadObjectpaths where possible.
Common mistakes
- LTS jumps (11 → 17 → 21) break subtle APIs. Keep
java -versionand CI JDK aligned. - Maven / Gradle snapshot dependencies destabilise production — pin to release tags.