DJVUpp / Desktop

Java desktop client
GNU General Public License v3.0
3 stars 2 forks source link

Exporting "Jar" from module #24

Closed digitamo closed 8 years ago

digitamo commented 8 years ago

Exporting "*.jar" problem:

Problem statement: Every thing goes well on the IDE, But when running the exported jar file I get a NullPointerException Here

Exception in thread "main" java.lang.NullPointerException
        at com.lizardtech.djview.frame.Frame.setURL(Frame.java:259)
        at com.lizardtech.djview.frame.Frame.setURL(Frame.java:194)
        at com.lizardtech.djview.frame.Frame.<init>(Frame.java:139)
        at com.lizardtech.djview.Main.openBookInNewTab(Main.java:72)
        at com.lizardtech.djview.Main.opendialog(Main.java:64)
        at com.lizardtech.djview.Main.<init>(Main.java:35)
        at DjVuTest.main(DjVuTest.java:5)
digitamo commented 8 years ago

Libraries and dependencies:

commit: 3908a4bbaa067ff8add16da1664bbec08c9ee561 removed all unnecessary libraries and exported the jar file.

digitamo commented 8 years ago

commit: c4d11f9033dc8e90f0e9a0897989474049188cd4

After debugging and tracing the code I found out that the error stream was closed, That's why I couldn't identify the Exception cause.

After turning the stream back on and tracking the exception. The cause of the problem was a reference image loading.