Skip to content

sudouser777/java-runtime-compiler

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

java-runtime-compiler

helps in compiling the java file at runtime

For compiling simple java code use below code

Class<?> cls = RuntimeCompiler.compile(sourceCodeString, "fullyqualifiedClassName");

// we can also specify file path
Class<?> cls = RuntimeCompiler.compile(Paths.get("filePath"), "fullyqualifiedClassName");

For compiling class that uses spring annotations or spring beans

Object obj = beanCompiler.compileAndGetSpringBean(sourceCodeString, "fullyqualifiedClassName");

//using file path
Object obj = beanCompiler.compileAndGetSpringBean(Paths.get("filePath"), "fullyqualifiedClassName");

About

helps in compiling the java file at runtime

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages