I run into a weird (for me at least) case. When i'm running my project from Eclipse everything is fine. But when I export the project to a jar file it fails with InvocationTargetException. I'm using other external libs and everything runs fine (program runtime is about 5 min) and it creates a docx at the end.
try {
WordprocessingMLPackage wordMLPackage;
wordMLPackage = WordprocessingMLPackage.createPackage(); // this is Line 1320
// more lines here
} catch (Exception e) {
e.printStackTrace();
}
I'm running in cmd and it prints:
Exception in thread "main" java.lang.reflect.InvocationTargetException
Caused by: java.lang.ExceptionInInitializerError
at com.lesswire.wita.Wita.CreateReport(Wita.java:1320)
How could i make it work in my jar ?
Thanks, roncsak