M
M
mr-ZA2019-06-20 21:23:03
Eclipse
mr-ZA, 2019-06-20 21:23:03

Eclipse IDE question, won't compile?

Hello everyone, when I run a program, I see the result of another program. When you force Run as..., the compilation customizer pops up with compilation profiles. How can I make it so that when the run button is pressed, the desired program is launched that is currently active?
5d0bcee831f2d116282942.png
5d0bcef29a741079692222.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey Cheremisin, 2019-06-21
@leahch

What do you want from this class? It does not have a main method, so it cannot be launched as an application. It does not inherit any classes, and will not be launched in any way either.
In other words - this class needs to be launched to some kind of environment. There are two options - make a main method public static void main(String[] args) { .... }, or run it from another class that will import and create your Person object.
Well, you can write a unit-test, within another test class.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question