I have a runnable jar with two banks in the Class-Path entry of the manifest file:
Class-Path: module1-0.0.1-SNAPSHOT.jar base-0.0.1-SNAPSHOT.jar Main-Class: test.MySPI
The program works fine, and all the dependencies in the indicated jars are executed. However, when I try to access the class path, there are no cans there:
String classpath = System.getProperty("java.class.path"); String[] entries = classpath.split(System.getProperty("path.separator")); for (String entry : entries) { System.out.println("Entry: " + entry); }
Only gives
Entry: .\module2-0.0.1-SNAPSHOT.jar
Is there any way to access the actual class path, since obviously the system is finding these banks in the path?
source share