mabe02 / lanterna

Java library for creating text-based GUIs
GNU Lesser General Public License v3.0
2.27k stars 242 forks source link

Internal Exception #425

Closed Saint-Theana closed 5 years ago

Saint-Theana commented 5 years ago

This is the problem that troubling me. I had to merge all lanterna's classes and my project's classes into one jar to make it work. When I devide those two guy I got this:

Exception in thread "Thread-0" java.lang.ExceptionInInitializerError at com.googlecode.lanterna.gui2.AbstractTextGUI.(AbstractTextGUI.java:60) at com.googlecode.lanterna.gui2.MultiWindowTextGUI.(MultiWindowTextGUI.java:157) at com.googlecode.lanterna.gui2.MultiWindowTextGUI.(MultiWindowTextGUI.java:147) at com.googlecode.lanterna.gui2.MultiWindowTextGUI.(MultiWindowTextGUI.java:126) at com.googlecode.lanterna.gui2.MultiWindowTextGUI.(MultiWindowTextGUI.java:107) at com.googlecode.lanterna.gui2.MultiWindowTextGUI.(MultiWindowTextGUI.java:90) at com.googlecode.lanterna.gui2.MultiWindowTextGUI.(MultiWindowTextGUI.java:60) at com.Tick_Tock.PCTIM.MainApp.initterminal(MainApp.java:244) at com.Tick_Tock.PCTIM.MainApp.run(MainApp.java:65) Caused by: java.lang.NullPointerException at com.googlecode.lanterna.bundle.LanternaThemes.loadPropTheme(LanternaThemes.java:110) at com.googlecode.lanterna.bundle.LanternaThemes.(LanternaThemes.java:46) ... 9 more

avl42 commented 5 years ago

make sure you also add the ressources to lanterna's jar file.

Saint-Theana commented 5 years ago

what resources? It's that my project's classes files?

avl42 commented 5 years ago

I meant the directory src/main/resources/ in lanterna's project root for the sources.

If you got lanterna as a binary package, the jar file likely has a couple of files ending in ".properties" - you may have these files in that "all-in-one" jar file, but upon separation of lanterna and your app, you might have forgotten these files, or left them in the wrong jar file. I'm just guessing.