execute a main class from a jar

后端 未结 3 809
余生分开走
余生分开走 2020-12-30 21:05

I have a jar which contain two main class Class A and Class B. In the manifest i have mentioned Class A . Now i have to execute classB from the same jar . what should be the

3条回答
  •  灰色年华
    2020-12-30 21:52

    Why don't you create a Main class that accepts an argument? That argument will decide whether to execute Class A or Class B then.

提交回复
热议问题