In Eclipse, it’s easy, I just need to add a class and tick into something like Add public static void main() then run. But with IntelliJ IDEA I can’t find how to create a simple “Hello World” project, the run button (Shift + F10) is always grayed out even after I added a main class in Edit Configurations. In fact, my JAVA background is not good and I am also a newbie to IntelliJ IDEA. So I am thankful to someone who show me a way to start.
Thank in advance.
p/s : I started with a Java Module project, import JDK 6.0, I didn’t choose any technology. Then I created a package and a class under src\. I saw a TUT video on youtube that there even has a make main() command with right click on the class name but I can’t find it anywhere. I am using IntelliJ IDEA 11 in 30 days evaluation.
This is a transcript of how I just created a Hello World in IDEA 10.5.2 on mac. It should be exactly the same on Windows or Linux.
(you might wanna jump to step 10)
public static void main-method, there is a live template for this, just typepsvmand press tab, it will expand to a complete main method.soutand press tab. Write something.