I have an Oracle Form running on the client's workstation. When the JVM that loads the form is started we have a several jar files loaded into the JVM classpath. I am trying to print the content of the classpath in one of the jars being loaded to the JVM, but every time is being printed only the one below:
classpath= C:\Program Files (x86)\Java\jre1.8.0_281\lib\deploy.jar
I used several ways one of them is this one
ClassLoader cl = ClassLoader.getSystemClassLoader();
URL[] urls = ((URLClassLoader)cl).getURLs();
for(URL url: urls){
System.out.println(url.getFile());
}
The question is How can I print all directories and libraries in the classpath not only a single library ?