You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
So at the line with 'Map<String, Class<?>> classMap = compiler.compileAll();' I get NullPointerException. I even set the property for JDK at the beginning. I'm not sure why this is happening, for my version is pretty much the same as your example...
(Also the '`' things are not part of it, I was just trying to insert the code)
Also here is the stack trace:
Exception in thread "main" java.lang.NullPointerException at org.mdkt.compiler.InMemoryJavaCompiler.compileAll(InMemoryJavaCompiler.java:80) at me.Perzan.compileString.CompileTest.main(CompileTest.java:26)
For me the Problem is that i generate unique filenames for the .java File,from input Code. With fixed names it does work.
Check the names calling.. do it like example, object names are not arbitrary - it has to match!
Activity
fgMAI commentedon Feb 9, 2019
I can confirm nullpointer exceptions. Only one time it worked, but i cannot Recall the difference from code.
fgMAI commentedon Feb 10, 2019
For me the Problem is that i generate unique filenames for the .java File,from input Code. With fixed names it does work.
Check the names calling.. do it like example, object names are not arbitrary - it has to match!
calebneuf commentedon May 22, 2021
getting this issue