My initial impressions of IntelliJ IDEA are that, I need to force myself to enjoy using it. Hopefully my obstacles to using IDEA will be resolved so I too can get with the program. In this post I'll shed some light on solving a big nasty roadblock I ran into with IDEA.
IDEA doesn't know what Java is.
|My first sign that something is very wrong:|
|IntelliJ IDEA Cannot resolve symbol 'String'|
IntelliJ becomes very annoying when it can't find the JDK. It will however prompt me every 10 seconds, that it recommends me to use org.apache.xpath.operations.String, instead of Java's in-built String. It will recommend me a whole crapload of things, such as detecting Spring, wanting to add IDEA project files to the git repository, but it won't detect that I don't have a JDK set.
The nail in the coffin:
|IDEA: Cannot resolve symbol 'java'|
This does wonders for programmer happiness, in fact, IDEA actually made me frustrated. Even though IDEA was the only IDE that had a certain feature that would be its selling point for me, all of that erases when it doesn't know what Java is, and doesn't give me Code Completion for String.
Properly set the IDEA Platform JDK for your project/module.
Go to Project Structure (Ctrl+Alt+Shift+A), and ensure that Platform Settings[SDK's] has your path for Java set, in my case /usr/lib/jvm/java-6-sun, and then the main fix:
Set the Project Settings[Project] --> Project SDK to your current JDK. I had mine set to none for the project I was working on. Therefore, no java, no string, no primitive types, no nothing.
Once you set that, it should kick off a reindex, and your project will have full Java support. I suppose during the install of IDEA, it didn't detect Java from the usual places, and decided not to ask me.
Sorry if this is a ranty post, but an uncooperative IDE is almost as bad as code thats not doing what you're intending it to.