Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Small problem to run any source code in Java

When creating any source code, as in the example below, and after clicking the button to execute, the result of the code execution does not appear, and instead always appears the phrase: "Built Successfully".

enter image description here

Not even clicking on F6 or Shift + F6 works.
Please, how do you go about showing the code result on the screen?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

You probably have another class with a main method which is configured to run as the "main class"

Option #1

Make sure the source file is selected in the editor and use Shift+F6 to "Run file"

Option #2

Right click on the project node and select "Properties"

enter image description here

Navigate to "Build" > "Run" and verify the "Main Class" property

enter image description here

Click "Browse" (next to "Main Class") and select the class you want to act as the "Main Class"

enter image description here

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading