Unable to run Java code with Intellij IDEA -
i have downloaded ide, , want edit first java file it, i'm not interested in creating whole project, editing single file.
so opened file desktop intellij idea set default program opening .java files.
i write code , main run , debug buttons greyed out! can't run code!
i have installed java 8 update 45 64-bit (i have 64 bit os) java development kit (j8u45). have set global ide sdk jdk installation, , when prompts me set project sdk, still run , debug buttons unable used!
edit: unable run file regardless of if in project or not.
edit 2: screenshot of project setup
move code inside of src
folder. once it's there, it'll compiled on-the-fly every time it's saved.
intellij recognizes files in specific locations part of project - namely, inside of blue folder considered source code.
also - while can't see all of source code - sure it's proper java syntax, class declared same file , has main
method (specifically public static void main(string[] args)
). intellij won't run code without main
method (rather, can't - neither nor java know start).
Comments
Post a Comment