cannot run a new java file in a newly created project in intellij IDEA 2018.1 Ultimate
Answered
Hi, i am totally new to java. I was able to successfully create my first project "MyPrograms". Then i created another new java file "first_program.java" under the "MyPrograms" directory. When i run it the previous file created automatically while creating the project the "Hello world " application is being executed. Please suggest how to run the new created java file"first_program.java".


Please sign in to leave a comment.
Hello,
Your "first_program.java" isn't located under sources root. Please move it under "src" directory.
@Yaroslav Bedrov thanks man it worked
You are welcome!