In my java application, I read a jar file (packaged with Maven shade plugin) into a bytestream. In the jar there is a entrypoint class defined in POM.xml
<build>
...
<plugins>
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifest>
<mainClass>com.mycompany.TheEntryPoint</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
How do I load such class into my java app dynamically?
Update:
- The jar is loaded as byte stream and does not reside in the file system or URL