.java
💻 CodeText-based

.java File — Java Source

text/x-java-source

File Inspector

Drop any file to identify its extension and type — runs entirely in your browser

JAVA

Drop a .java file here or click to choose

Or drop any file to identify its extension

Expected MIME type:text/x-java-source

Quick Facts

Extension.java
Full NameJava Source
MIME Typetext/x-java-source
CategoryCode
TypeText-based (human-readable)
Typical Size1 KB – 100 KB
First Appeared1995

What Is a .java File?

Java is a class-based, object-oriented programming language designed for platform independence through the Java Virtual Machine (JVM). Created by James Gosling at Sun Microsystems in 1995, Java's "write once, run anywhere" philosophy meant that compiled Java bytecode could run on any platform with a JVM. JAVA files contain source code that is compiled to .class bytecode files by the javac compiler. Java has been one of the most widely used programming languages for over two decades, powering enterprise backend systems, Android mobile applications, big data processing (Hadoop, Spark), web services, financial trading systems, and scientific applications. The language features strong static typing, automatic garbage collection, comprehensive standard libraries, robust multithreading, and extensive enterprise frameworks (Spring, Jakarta EE). Java's ecosystem includes the massive Maven Central repository, build tools like Maven and Gradle, and mature IDE support from IntelliJ IDEA, Eclipse, and NetBeans. Modern Java (versions 17+) has added features like records, sealed classes, pattern matching, text blocks, and virtual threads that significantly modernize the language.

How to Open .java Files

IntelliJ IDEA
Eclipse
VS Code
NetBeans
vim
any text editor

Related File Extensions

More Code File Extensions

Other code formats you might encounter

Browse File Extensions by Category

Explore our reference of 259 file extensions with details, programs, and related formats.