Reputation: 31
I need some help with IntelliJ. I am fairly new to programming, and I have some experience with the IDE but I am by no means a know-it-all when it comes to IntelliJ.
I have 3 Java files (without their respective class files). When I open intelliJ it asks me:
I click on open, IntelliJ opens up a file location, I click on one of the three Java files to open, and I drag the other two one by one (they open in their separate tab).
I cannot figure out how to run them. It is likely that I need to create run configuration and I don't know how to do it. I know how to create a new project and get everything working, but I don't know how I can get the files working if I just open them. Can someone tell me how to create the run configurations to run the files? Please and thank you.
Upvotes: 2
Views: 6680
Reputation: 31
Folders have to be marked as source root. Right click the project directory, and scroll down to Mark Directory As, and then select Source Root. Solved the problem for me.
Upvotes: 0
Reputation: 912
IntelliJ IDEA is a great IDE!
This is what I would do:
It the project fails on compilation you might need to add required imports and libraries, but that depends on your code. IDEA will highlight all the errors.
Upvotes: 2