I have a scenario where I need to make a dummy executable jar with Main-Class
from a different jar which is in classpath ( i.e., main class is not in the dummy jar). Is that possible to achieve this?
This is because the jar which is having the main class is not an executable jar but same time I don't want to tamper with it since it is a third-party jar, while as per our standard application invoke scripts we should use an executable jar to invoke the application. Hence I created that dummy jar with Main-Class
in it. But still it's giving:
Error: Could not find or load main class
eg : dummy.jar manifest entries
:
Main-Class: com.thirdparty.jar.MainClass
Class-Path:thirdpartyapp.jar
Here the com.thirdparty.jar.MainClass
is inside thirdpartyapp.jar
.
Thanks in advance :)