Thank you very much for taking the time and giving me feedback.
close
Visitors are also reading...
← PreviousNext →

Intellij - "J" is shown instead of "C"

31 May 2011

As I was looking at my blog’s search keys that got people here, I noticed a weird one

intellij class file icon show j instead of c

It seems I am the first result in google for this query. But amazingly, it is for an “axis” related post.

I decided I should dedicate a small post for this specific problem just in case someone else runs into it. Just so you’d know, I didn’t find the result in intellij’s icons reference page.

There are 3 icons related to Java you should be aware about

Not in Source

This icon means that the file is not under a source root.
To add a source root in intellij, you should:

Once you did that - you will see a different icon.

Java (not a class) Icon

This icon means the file has a “java” extension. However - it is not a class!
You are probably wondering if there are such files. Yes there are. For example pacakge-info.java

In order to make this a class, all you have to do is enter the word “class” and the beginning of the class’ name.
For example

class G{}

Would suffice.

Then you will see the third icon, which is well known :

Great Comments

Thanks for all the comments on this post.
Someone posted that the “J” icon also happens when your java file is too big.
You can fix this by editing the “idea.max.intellisense.filesize” property in your “idea.properties” file.
Here is how you do this if you are in windows vista or higher

The property’s documentation is

#---------------------------------------------------------------------  
# Maximum file size (kilobytes) IDEA should provide code assistance for.  
# The larger file is the slower its editor works and higher overall system memory requirements are  
# if code assistance is enabled. Remove this property or set to very large number if you need  
# code assistance for any files available regardless their size.  
# Please note this option doesn't operate with Java files. Regardless of the option value code assistance will anyway stay there.  
#---------------------------------------------------------------------  
idea.max.intellisense.filesize=2500  

The documentation says this property does not relate to Java files, but as comments suggest, it does. Thank you all for all the comments. This is exactly why I started the blog.

← PreviousNext →