trung / Inmemoryjavacompiler
Licence: apache-2.0
Utility class to compile java source code in memory
Stars: ✭ 174
Programming Languages
java
68154 projects - #9 most used programming language
Labels
Projects that are alternatives of or similar to Inmemoryjavacompiler
Copyright Header
© Copyright Header is a utility to manipulate software licenses on source code.
Stars: ✭ 168 (-3.45%)
Mutual labels: source-code
Eval
Eval is a lightweight interpreter framework written in Swift, evaluating expressions at runtime
Stars: ✭ 157 (-9.77%)
Mutual labels: compiler
Jitfromscratch
Example project from my talks in the LLVM Social Berlin and C++ User Group
Stars: ✭ 158 (-9.2%)
Mutual labels: compiler
Compile To Web
Discover what languages can be compiled to Web Assembly
Stars: ✭ 164 (-5.75%)
Mutual labels: compiler
Cs2cpp
C# to C++ transpiler (Cs2Cpp) (Powered by Roslyn)
Stars: ✭ 155 (-10.92%)
Mutual labels: compiler
Corewar
A reproduction of the Core War game. Assembly compiler, Virtual Machine and GUI.
Stars: ✭ 173 (-0.57%)
Mutual labels: compiler
Elena Lang
ELENA is a general-purpose language with late binding. It is multi-paradigm, combining features of functional and object-oriented programming. Rich set of tools are provided to deal with message dispatching : multi-methods, message qualifying, generic message handlers, run-time interfaces
Stars: ✭ 161 (-7.47%)
Mutual labels: compiler
Redacted Compiler Plugin
A Kotlin compiler plugin that generates redacted toString() implementations.
Stars: ✭ 168 (-3.45%)
Mutual labels: compiler
Rhine
🔬 a C++ compiler middle-end, using an LLVM backend
Stars: ✭ 157 (-9.77%)
Mutual labels: compiler
Nodejs Nucleus Plus Internals
NodeJS源码分析-由浅入深解析架构以及运行原理
Stars: ✭ 157 (-9.77%)
Mutual labels: source-code
Lbac Swift
Let's Build a Compiler by Jack Crenshaw translated to Swift Playgrounds
Stars: ✭ 156 (-10.34%)
Mutual labels: compiler
Awesome Php Src
🚀 A curated list of awesome resources related to PHP source code
Stars: ✭ 163 (-6.32%)
Mutual labels: source-code
Xl
A minimalist, general-purpose programming language based on meta-programming and parse tree rewrites
Stars: ✭ 171 (-1.72%)
Mutual labels: compiler
Awesome Machine Learning In Compilers
Must read research papers and links to tools and datasets that are related to using machine learning for compilers and systems optimisation
Stars: ✭ 168 (-3.45%)
Mutual labels: compiler
Update 09/22/2017: I've been silent for long time (I'm into Golang lately hence putting Java aside) despite the fact that there are lots of interests to make this mini tool better. I'll kick off my effort to improve this tool from now on by reviewing outstanding issues and PRs
InMemoryJavaCompiler
Samples with utility classes to compile java source code in memory
After taking huge effort to look for example on the internet and found nothing work. I decided to create a very simple version.
Note: Please make sure you use JDK in your runtime
E.g.:
StringBuilder sourceCode = new StringBuilder();
sourceCode.append("package org.mdkt;\n");
sourceCode.append("public class HelloClass {\n");
sourceCode.append(" public String hello() { return \"hello\"; }");
sourceCode.append("}");
Class<?> helloClass = InMemoryJavaCompiler.newInstance().compile("org.mdkt.HelloClass", sourceCode.toString());
If you are looking for more examples, please look at unit tests in the src/test/java
folder
Artifact is pushed to Sonatype OSS Releases Repository
https://oss.sonatype.org/content/repositories/releases/
Maven dependency:
<dependency>
<groupId>org.mdkt.compiler</groupId>
<artifactId>InMemoryJavaCompiler</artifactId>
<version>1.3.0</version>
</dependency>
License
Note that the project description data, including the texts, logos, images, and/or trademarks,
for each open source project belongs to its rightful owner.
If you wish to add or remove any projects, please contact us at [email protected].