JavaCompileEngine is an efficient open source Compiling Library, usable in Java frameworks for compiling programming languages files and Processing Commands with instant feedback. I wrote this project out of curiosity but it's useful in many situations e.g. Programming Contests Sites, Online Compilers, Online Code Learning and etc.
These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.
You can download a jar version from GitHub's releases page for using as a library.
Or you can Clone the project
Clone Over HTTPS
$ git clone https://github.com/mehditeymorian/JavaCompileEngine.git
Clone Over SSH
$ git clone git@github.com:mehditeymorian/JavaCompileEngine.git
Note: This Project used Lombok. check Lombok Install for different environment setups if you want to develope to project otherwise, it's not neccessary.
Note: For working properly, you need to add Gson to your project.
CompileResult compileResult = Compiler.builder()
.fileAddress("H:\\m.java")
.fileLanguage(Compiler.JAVA)
.withExceedTime(true)
.exceedTimeInMillis(200)
.onEachProcessListener(new OnEachProcessListener() {
@Override
public void command(String command, int index) {
System.out.printf("Command%d: %s\n",index+1,command);
}
@Override
public void processResult(String result, int index) {
System.out.printf("Result%d: %s\n",index+1,result);
}
}).build().compile();
System.out.println("Compiling Finished!");
System.out.println(Arrays.toString(compileResult.getCommands()));
System.out.println(compileResult.getCompileState().name());
System.out.println(compileResult.getDuration());
System.out.println(compileResult.isWithExceedTime());
See Documentation for more Information.
Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.
To report a specific problem or feature request, open a new issue on Github. For questions, suggestions, or anything else, Email me
- Built With
- Gradle - Automation System
- Intellij IDEA - Developing Environment
- Versioning
- We use SemVer for versioning. For the versions available, see the JavaCompileEngine Tags.
- Authors
- Mehdi Teymorian Github Page
- contributors who participated in this project.
This project is licensed under the MIT License - see the LICENSE.md file for details