Dynamic class compilation in Karaf

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Dynamic class compilation in Karaf


I am porting an old java code base to OSGI. In the old code base there is dynamic code generation used. Example : a string is compiled to generate java classes using com.sun.tools.javac.Main.compile.

I was reusing the same code and added com.sun.tools.javac in etc/custom.properties -> org.osgi.framework.system.packages.extra:= com.sun.tools.javac.

During runtime I get the exception java.lang.NoClassDefFoundError: com/sun/tools/javac/Main

Could anyone please help me out with some suggestions to overcome the problem.

Thanks JK