* them if need be.
*
* @throws Exception
*/
protected void addDeployedClasspathJars() throws Exception {
Submit client = getBytemanClient();
List<String> paths = new ArrayList<String>();
// do the boot jars first
File dataDir = this.bootJarsDataDir;
File[] files = dataDir.listFiles();
if (files != null && files.length > 0) {
List<String> loadedJars = client.getLoadedBootClassloaderJars();
for (File file : files) {
if (!loadedJars.contains(file.getAbsolutePath())) {
paths.add(file.getAbsolutePath());
}
}
client.addJarsToBootClassloader(paths);
}
// now do the system jars
paths.clear();
dataDir = this.systemJarsDataDir;
files = dataDir.listFiles();
if (files != null && files.length > 0) {
List<String> loadedJars = client.getLoadedSystemClassloaderJars();
for (File file : files) {
if (!loadedJars.contains(file.getAbsolutePath())) {
paths.add(file.getAbsolutePath());
}
}
client.addJarsToSystemClassloader(paths);
}
return;
}