I can't create a Java class with a specific name in IntelliJ

I can't create a Java class with a specific name in IntelliJ

When using IntelliJ IDEA as usual, one day suddenly only when a specific class name An error occurred and I couldn't create a Java class. When I searched on the net, there was a lot of information on Android Studio and it was difficult to solve it, so a memo

Event

When I try to create a class with a specific name ("Main" this time) ...

image.png

I get an error image.png

Error message


Unable to parse template "Class"
Error message: Selected class file name "Main.java" mapped to not java file type 'Files supported via TextMate bundles'

The contents of the generated file are not recognized as a class image.png

Normally··· image.png

Should be like this image.png

Correspondence

In "Editor> File Types" of the setting, "Main.java" was included in the file name to be recognized as a text file for some reason, so delete it image.png

Recognized as a safe class image.png

Looking back

As a workaround for a similar error in Android Studio, some people pointed out that it was a problem with the code template in the settings, and I was addicted to misleading. Reach the correct answer in the search results excluding Android Studio, and be careful not to be confused by information on similar software. (When I read the error message again, was there an answer to'Files supported via TextMate bundles' ??)

Recommended Posts

I can't create a Java class with a specific name in IntelliJ
Create a CSR with extended information in Java
[Windows] [IntelliJ] [Java] [Tomcat] Create a Tomcat9 environment with IntelliJ
I tried to create a Clova skill in Java
I tried to create a java8 development environment with Chocolatey
Create a SlackBot with AWS lambda & API Gateway in Java
Even in Java, I want to output true with a == 1 && a == 2 && a == 3
Create an immutable class with JAVA
I created a PDF in Java.
How to create a new Gradle + Java + Jar project in Intellij 2016.03
Create Java Spring Boot project in IntelliJ
What is a class in Java language (1 /?)
What is a class in Java language (2 /?)
Create a TODO app in Java 7 Create Header
Create a temporary class with new Object () {}
Split a string with ". (Dot)" in Java
Creating a matrix class in Java Part 1
Even in Java, I want to output true with a == 1 && a == 2 && a == 3 (PowerMockito edition)
I want to create a dark web SNS with Jakarta EE 8 with Java 11
I wrote a Lambda function in Java and deployed it with SAM
I want to ForEach an array with a Lambda expression in Java
I made a primality test program in Java
GetInstance () from a @Singleton class in Groovy from Java
Read a string in a PDF file with Java
Let's create a timed process with Java Timer! !!
Try to create a bulletin board in Java
[Java] Create a collection with only one element
I wanted to make (a == 1 && a == 2 && a == 3) true in Java
I wrote a primality test program in Java
Let's create a super-simple web framework in Java
I made a rock-paper-scissors game in Java (CLI)
Create a tool for name identification in Salesforce
A quick review of Java learned in class
I tried to create Alexa skill in Java
I wrote a prime factorization program in Java
I tried to break a block with java (1)
Let's make a calculator application with Java ~ Create a display area in the window
Even in Java, I want to output true with a == 1 && a == 2 && a == 3 (Javassist second decoction)
Even in Java, I want to output true with a == 1 && a == 2 && a == 3 (black magic edition)
Let's create a TODO application in Java 2 I want to create a template with Spring Initializr and make a Hello world
I tried to create a shopping site administrator function / screen with Java and Spring
I made a simple calculation problem game in Java
How to create a Java environment in just 3 seconds
A quick review of Java learned in class part4
[Java] Create a filter
Write a class that can be ordered in Java
[Beginner] Create a competitive game with basic Java knowledge
How to create a Spring Boot project in IntelliJ
Write a class in Kotlin and call it in Java
I want to monitor a specific file with WatchService
How to create a data URI (base64) in Java
[Java] Execute a specific process in another thread with Executor Service [Avoid infinite loop]
I tried to make a login function in Java
Quickly implement a singleton with an enum in Java
I dealt with Azure Functions not working in Java
I tried OCR processing a PDF file with Java
Let's create a TODO application in Java 11 Exception handling when accessing TODO with a non-existent ID
[Note] Create a java environment from scratch with docker
What I learned when building a server in Java
Output true with if (a == 1 && a == 2 && a == 3) in Java (Invisible Identifier)
A quick review of Java learned in class part3