I wrote a Java project in NetBeans IDE. This project contains two abstract Java Classes which are compiled with InMemoryJavaCompiler.
When I run the code in the IDE it works. I produced a .jar file from this project with build packing and clear and build.
When I run the .jar file I receive a NullPointerException error when I use the abstract classes.
Could someone suggest some solution?
Thank you for your help in advance!
We would need to see the **complete** exception message, including the stack trace with line numbers. Then we'd also need to see the code that includes the line of your code that the exception blames for the null pointer.
Here is the ComPiler.java class where I used InMemoryJavaCompiler:
and here is the part of the code where I called the ComPiler Class:
I receive the following error: