Skip to content

Instantly share code, notes, and snippets.

huxendupsel

Block or report user

Report or block huxendupsel

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@huxendupsel
huxendupsel / jasperreports_javac.md
Last active Dec 1, 2016
jasperreport compile report over jre leads to exception
View jasperreports_javac.md

Jasperreport compile report over JRE leads to exception

to compile a report via

JasperCompileManager.compileReportToStream(design, os);

you have to provide some kind of compile mechanism. On default the javac of the jdk is used to compile the jrxml to jasper file. So if you're not using jdk but jre instead the code will not work. It will produce exceptions like this:

net.sf.jasperreports.engine.JRException: Error compiling report java source files :C:\Workspace\ABOVU-Client\file_1479896387177_924178.java 
	at net.sf.jasperreports.engine.design.JRJavacCompiler.compileClasses(JRJavacCompiler.java:106)
	at net.sf.jasperreports.engine.design.JRAbstractClassCompiler.compileUnits(JRAbstractClassCompiler.java:77)
You can’t perform that action at this time.