从jar执行一个主类

问题描述:

我有一个包含两个主要类A类和B类的jar。在清单中我提到了A类。现在我必须从同一个jar中执行classB。什么应该是命令。

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 command.

我不喜欢制作两个独立的罐子。

I dont prefer to make two separate jars.

谢谢

这将完成这项工作: java -classpath yourjar.jar youpackage.B