I am writing a code for creating an Excel sheet programmatically. But, whenever I am exporting it as a jar, the created jar replaces all the constants used with their values.
Source Code:
XSSFRow row0 = mySheet.createRow(rowStartPos);
XSSFCellStyle style = myWorkbook.createCellStyle();
style.setBorderTop(CellStyle.BORDER_DOUBLE);
style.setBorderBottom(CellStyle.BORDER_THIN);
XSSFFont font = myWorkbook.createFont();
font.setFontHeightInPoints((short) 10);
font.setBoldweight(Font.BOLDWEIGHT_BOLD);
style.setFont(font);
Jar Code:
XSSFRow row0 = my_sheet.createRow(rowStartPos);
XSSFCellStyle style = my_workbook.createCellStyle();
style.setBorderTop((short)6);
style.setBorderBottom((short)1);
XSSFFont font = my_workbook.createFont();
font.setFontHeightInPoints((short)10);
font.setBoldweight((short)700);
style.setFont((Font)font);
which might be the default behavior, but does not help my cause. What should I do to keep those Constants as it is?