I'm trying to generate a runnable jar file of my project which has a JavaFx gui. The project runs greate in eclipse but whenI try to run the jar:
Exception in thread "main" java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
...Caused by: java.lang.NullPointerException: Input stream must not be null
The code for the images looks like:
private Image image1 = new Image(this.getClass().getResourceAsStream("../pic/classic/image1.png"));
What do I need to change so that i can run my jar file with no exception.
Thanks for the help.