-2
I have developed a client server program, in which I have two Mains:
- one to run the server
- other to run several customers
To extract the file . jar from ecplise I export runnable Jar File.
I can run in the command console when I have only one main but two Mains? It’s just that when I export I have to clarify the main to run the program.
It makes no sense to join the two Mains since I only need to run the server once. I do need to run the client several times
It wouldn’t be the case to just run each jar in a different CMD window?
– ronssm
Hello rrr, I don’t know if I understand your need, but it seems to me you have two classes main, one for the client and one for the server within the same correct jar? Your problem is that you want to select which of the classes to run, is that it? If yes you can do this by placing the application jar in the classpath and specifying the class to be executed. See the first command of this response.
– Anthony Accioly
@Anthonyaccioly thanks for the interest. I already know how to solve the problem I will post the answer take a look
– rrr