This is finally what worked for me! Phew! My problem: whenever I exit Intellij and try to open an old / existing project, it is difficult for me to get the assemblies and do the work on my local host. I just use localhost.
Here are the steps that ultimately worked in my local environment:
1. Go to the project structure and select a project
but. Set the SDK to 10 ("Java Version 10.0.2") or whatever you use.
b. (I think this was the main step that I was missing). Set the project compiler output to indicate where I want the compiled output to sit: C: \ Users \ kbala \ OneDrive - MatrixCare \ SoftWLearnings \ Javamyfun \ NewHelloWorld \ out
from. Project language level: I selected "SDK Default"
2. Go to the project structure and select the modules
but. Press src (this is where my source code is sitting).
b. Then click the Sources folder icon at the top. This adds src to the "Source folders" on the right. You will see a color change on blue
from. Click OK.
3. Then click "Add Configuration" (Intellij top right corner)
but. Select + in the upper left corner.
b. Select "Application"
from. Change the name to "Main"
e. Now click on the Ellipsis (three dots) in the "Main Class". You should now see your main class. Select it.
e. Now you should see the progress arrow in this upper right corner of Intellij. And you should see the build icon (Hammer).
That should work!
user9944315
source share