Integer has been deprecated and marked for removal

JRJdk13Compiler shows theses warnings:

warning: [removal] Integer(int) in Integer has been deprecated and marked for removal value = new java.lang.Integer(1); //$JR_EXPR_ID=1$

Most probably this deprecated syntax (new java.lang.Integer(int)) is used for initialization of Integer variables defined in the report (built-in variables). Could someone please help me how to change that initialization for Integer.valueOf(int)?

Many thanks


ondragalik's picture
Joined: May 6 2011 - 4:37am
Last seen: 4 months 1 week ago

Thank you for posting to the Jaspersoft Community. Our team of experts has read your question and we are working to get you an answer as quickly as we can. If you have a Jaspersoft Professional Subscription plan, please visit for direct access to our technical support teams offering guaranteed response times.

mrajkuma - 4 months 2 weeks ago

FYI You should be able to install JDK 8 alongside 9 and point studio to use 8, Preferences -> Java -> Build Path. You can have multiple JDKs on the same os.

darth_fader - 4 months 2 weeks ago

I am using JasperReports as an reporting add-on in which generates report from the jrxml on the fly. So this is more jmix configuration issue. Maybe its future update will resolve that.


ondragalik - 4 months 2 weeks ago

2 Answers:

This deprecation started on JDK V9. JasperReports library (and JasperServer) are compatible with specific versions of Java, and so if you compiled the report in JDK 8 you'd eliminate this issue.

Potential solutions include:

1. install JDK 8 and configuring your environment to use that rather than 13

2. update the version of JasperReports/Server you're using - assuming the latest libraries are compatible with JDK 13, I'm a few versions behind and so I'm not sure what's compatible with what

3. ignore it for now - this type of deprecated functionality is not likely to cause problems - that type of casting is so widely used, and the integer functionality so basic, that you likely won't have any problems with this. If your project can't tolerate these warnings, you'll have to work through one of the first two options.


darth_fader's picture
Joined: Mar 7 2010 - 9:45pm
Last seen: 37 min 37 sec ago


thank you for your answer. I'm using version 6.9 which supports JDK V9 (since 6.8. has support up to Java 11). I can ignore warnings for now. 


ondragalik's picture
Joined: May 6 2011 - 4:37am
Last seen: 4 months 1 week ago