akuma8
akuma8

Reputation: 4691

Apache poi migration to jdk 11 issue

I am currently migrating an application from jdk 8 to 11 but I have some issue with Apache Poi library. Some classes, methods and constants were removed and I am unable to find a migration guide from their website. The previous version was 3.13 and I upgraded it to 4.0.1.

This is an example of errors:

enter image description here

Any help will be appreciated.

Thanks

Upvotes: 2

Views: 3677

Answers (1)

XtremeBaumer
XtremeBaumer

Reputation: 6435

This is a list of the updated methods/parameters you need with apache poi 4

stepFont.setBold(true);
pathIdCellStyle.setAlignment(HorizontalAlignment.CENTER);
pathIdCellStyle.setVerticalAlignment(VerticalAlignment.CENTER);
pathIdCellStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
pathIdCellStyle.setFillPattern(FillPatternType.THIN_FORWARD_DIAG);

I am not aware of a migration guide, so the most convenient way I found (using Eclipse IDE) is to type the variable name (e.g. pathIdCellStyle), add the dot for a method call and then let auto-complete do its job. It suggest you all available methods as well as the parameters you need to pass in (with the actual class you need to use)

Upvotes: 2

Related Questions