Problem- My application is used in a production environment across a few hundred computers. The issue arose after installing some new computers and finding out that my application was crashing on ONLY the new computers. The new computers came with JAVA v8u5, in attempts to fix the issue I also installed v7u55 (I thought it might be a versioning issue). NOTE* I'm compiling using JDK v7u45 **
Root Cause- The failing code is a call to the Calendar.getDisplayName(int, int, Locale)
Code That is failing:
System.out.println("Getting calendar instance");
Calendar instanceCalendarObj = Calendar.getInstance();
String date = instanceCalendarObj.getDisplayName(Calendar.MONTH, 0, Locale.ENGLISH);
date = date.concat(" "+String.valueOf(instanceCalendarObj.get(Calendar.DAY_OF_MONTH)));
date = date.concat(", "+String.valueOf(instanceCalendarObj.get(Calendar.YEAR)));
JOptionPane.showMessageDialog(this, date);
Error Message:
Exception in thread "AWT-EventQueue-0" java.lang.IllegalArgumentException
at java.util.Calendar.checkDisplayNameParams(Unknown Source)
at java.util.Calendar.getDisplayName(Unknown Source)
Any help would be greatly appreciated, even if its just a workaround.