0

I cannot create java class file with name TokenProperties.java. I also tried restart and clean cache but doesn't help. Class with different name I can crate.

Here is error pop-up.

enter image description here

File will added but marked as plain text file, and no java file.

enter image description here

Do you have idea whats is going on? Thank you.

Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174
  • Where did you try to create the file in the project? – Jason Mar 08 '20 at 16:52
  • @Jason I updated question. I tried add next to main class – Denis Stephanov Mar 08 '20 at 16:55
  • The packaging is correct. It kind of looks like you create a TXT file with the name *TokenProperties.java* when you want to create a JAVA file with the name *TokenProperties* similar to how DemoAAplication was created. – Jason Mar 08 '20 at 16:56
  • 1
    @DenisStephanov See if [disabling](https://www.jetbrains.com/help/idea/managing-plugins.html) TextMate bundles plug-in helps. – jose praveen Mar 08 '20 at 17:14
  • 1
    @DenisStephanov check whether [filetype](https://www.jetbrains.com/help/idea/creating-and-registering-file-types.html) .java file extension was mapped to the wrong file type. – jose praveen Mar 08 '20 at 17:15
  • @JosePraveen thank you for effort but I have to reinstalled idea and now it works – Denis Stephanov Mar 08 '20 at 17:16
  • 1
    @DenisStephanov similar [issue](https://stackoverflow.com/a/59651102/8035260) but fixed. – jose praveen Mar 08 '20 at 17:17

2 Answers2

0

It kind of looks like you create a TXT file with the name TokenProperties.java when you want to create a JAVA file with the name TokenProperties similar to how DemoAAplication was created.

  1. Right click com.example.demoa package.
  2. Select New
  3. Select Java Class
Jason
  • 5,154
  • 2
  • 12
  • 22
0

I wasn't able to fix it so I reinstalled Intellij and now it works.

Denis Stephanov
  • 4,563
  • 24
  • 78
  • 174