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
I try to compile my NC_writer class with
Class<?> Netcdf_writer = InMemoryJavaCompiler.newInstance().compile("meteoread.NC_writer", sourceCode.toString());
but it is not possible because newInstance() symbol cannot be found. I can use just
Class<?> Netcdf_writer = InMemoryJavaCompiler.compile("meteoread.NC_writer", sourceCode.toString());
It works in NetBeans IDE but after I built the program and I run the .jar file I get NulPointerException error. How should I fix this problem? I use InMemoryJavaCompiler-1.2
I have downloaded the InMemoryJavaCompiler-1.3.0. I could use: Class<?> Netcdf_writer = InMemoryJavaCompiler.newInstance().compile("meteoread.NC_writer", sourceCode.toString()); DataNcSource instance = (DataNcSource) Netcdf_writer.newInstance(); instance.getDataNc();
but after I run my .jar program I got the NulPointerException as well:
java.lang.NullPointerException
at org.mdkt.compiler.InMemoryJavaCompiler.compileAll(InMemoryJavaCompiler.java:80)
Activity
szabotakacsb commentedon Dec 17, 2020
I have downloaded the InMemoryJavaCompiler-1.3.0. I could use:
Class<?> Netcdf_writer = InMemoryJavaCompiler.newInstance().compile("meteoread.NC_writer", sourceCode.toString()); DataNcSource instance = (DataNcSource) Netcdf_writer.newInstance(); instance.getDataNc();but after I run my .jar program I got the NulPointerException as well:
How should I fix this error?