---
title: "JAVA .GITIGNORE"
category: SNIPPETS
date: 2026-11-04
version: "1.0"
format: "TXT"
size: "290 B"
license: "CC0-1.0"
sha256: affbdc2a83b7d656b98cb2f77f6c33e8ce8221919ea1a50d803b19647588f07d
source: "https://github.com/github/gitignore/blob/main/Java.gitignore"
download: "https://original.wales/files/snippets/java.gitignore"
tags: ["GITIGNORE","GIT","JAVA","OFFICIAL"]
summary: "GitHub’s official Java .gitignore template."
canonical: "https://original.wales/files/gitignore-java/"
---

# JAVA .GITIGNORE

GitHub’s official Java .gitignore template.

## TEXT

# Compiled class file
*.class

# Log file
*.log

# BlueJ files
*.ctxt

# Mobile Tools for Java (J2ME)
.mtj.tmp/

# Package Files #
*.jar
*.war
*.nar
*.ear
*.zip
*.tar.gz
*.rar

# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
hs_err_pid*
replay_pid*

## SOURCE

https://github.com/github/gitignore/blob/main/Java.gitignore
