.java

What is a .java file?

Java is a widely used programming language — running Android apps, enterprise backends, and big data platforms on the JVM.

Safe format
Type Code
By James Gosling / Sun Microsystems (now Oracle)
MIME text/x-java

Drop any file to identify it

No upload. No signup. No sending your file halfway across the internet.
We tell you what it is, right here in your browser.

What is it

You have a .java file — source code for one of the most widely deployed programming languages in the world. Java powers Android apps, enterprise backend systems, big data platforms (Hadoop, Spark, Kafka), and a staggering amount of banking, insurance, and government software that will outlive us all.

James Gosling created Java at Sun Microsystems in 1995 with a radical promise: "write once, run anywhere." Java code compiles to bytecode that runs on the Java Virtual Machine (JVM), which exists for every operating system. This platform independence made Java the enterprise standard. The language is verbose by modern standards (everything is a class, even when it shouldn't be), but recent versions (Java 17+) have added records, pattern matching, and sealed classes that make it less ceremonial.

IntelliJ IDEA (Community Edition, free) is the standard Java IDE. VS Code with the Java Extension Pack works well for lighter projects. Eclipse (free, long-standing) remains common in enterprise shops. To compile and run: install the JDK from adoptium.net, then `javac File.java && java File`.

Technical details
Full Name
Java Source Code
MIME Type
text/x-java
Developer
James Gosling / Sun Microsystems (now Oracle)
Magic Bytes
N/A
Safety
.java is a known, safe format.
What opens it
IntelliJ IDEA
FREE All
VS Code
FREE All
Any text editor
FREE All

* Community edition

FAQ
Is Java the same as JavaScript?
No. They share a name for historical marketing reasons but are completely different languages. Java is compiled, statically typed, and runs on the JVM. JavaScript is interpreted, dynamically typed, and runs in browsers. They have different syntax, ecosystems, and use cases.
Is Java still relevant?
Extremely. Java runs most enterprise software, most Android apps, and most big data platforms. It has one of the largest developer ecosystems in the world. The language continues to evolve with modern features — it's not going anywhere.
Related formats