我得到一个乔达时间MissingResourceException异常
java.util.MissingResourceException: Can't find bundle for base name org.joda.time.format.messages, locale en
;
DateTime start = new DateTime();
DateTime end = new DateTime(2017, 3, 26, 12, 0, 0, 0);
Interval interval = new Interval(start, end);
Period period = interval.toPeriod();
// This line is causing the exception.
System.out.println(PeriodFormat.getDefault().print(period));
堆栈跟踪的相关部分:
Caused by: java.util.MissingResourceException: Can't find bundle for base name org.joda.time.format.messages, locale en
at java.util.ResourceBundle.throwMissingResourceException(Unknown Source) ~[?:1.8.0_65]
at java.util.ResourceBundle.getBundleImpl(Unknown Source) ~[?:1.8.0_65]
at java.util.ResourceBundle.getBundle(Unknown Source) ~[?:1.8.0_65]
at org.joda.time.format.PeriodFormat.buildWordBased(PeriodFormat.java:217) ~[?:?]
at org.joda.time.format.PeriodFormat.wordBased(PeriodFormat.java:205) ~[?:?]
at org.joda.time.format.PeriodFormat.getDefault(PeriodFormat.java:73) ~[?:?]
我使用约达时间2.9.2和IntelliJ IDEA 15.0.1与主要的Maven
嗯,除了不以纯新java命令行项目出现。 – 4D617274696A6E
好了,奇怪,我重新启动它是运行在服务器和它的工作.. – 4D617274696A6E