Check whether the current classpath already contains our jasper libraries and dependencies or not.
Without validating this the classpath would grow and contain duplicated references with every jasper report you print.
This commit is contained in:
parent
bc451d1044
commit
f445ee98c7
|
@ -815,6 +815,10 @@ public class ReportStarter implements ProcessCall {
|
||||||
}
|
}
|
||||||
|
|
||||||
if(jasperreportsAbsolutePath != null && !jasperreportsAbsolutePath.trim().equals(""))
|
if(jasperreportsAbsolutePath != null && !jasperreportsAbsolutePath.trim().equals(""))
|
||||||
|
{
|
||||||
|
// Check whether the current CLASSPATH already contains our
|
||||||
|
// jasper libraries and dependencies or not.
|
||||||
|
if(System.getProperty("java.class.path").indexOf(jasperreportsAbsolutePath) < 0)
|
||||||
{
|
{
|
||||||
System.setProperty("java.class.path",
|
System.setProperty("java.class.path",
|
||||||
System.getProperty("java.class.path") +
|
System.getProperty("java.class.path") +
|
||||||
|
@ -823,6 +827,7 @@ public class ReportStarter implements ProcessCall {
|
||||||
log.info("Classpath has been corrected to " + System.getProperty("java.class.path"));
|
log.info("Classpath has been corrected to " + System.getProperty("java.class.path"));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author rlemeill
|
* @author rlemeill
|
||||||
|
|
Loading…
Reference in New Issue