Skip to content

mehditeymorian/JavaCompileEngine

Repository files navigation

JavaCompileEngine

Codacy Badge | View JCE's Documentation

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.

JavaCompileEngine

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes.

Downloading

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.

How Do I Use JavaCompileEngine?

        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.

Contributing

Please read CONTRIBUTING.md for details on our code of conduct, and the process for submitting pull requests to us.

Getting Help

To report a specific problem or feature request, open a new issue on Github. For questions, suggestions, or anything else, Email me

General Information

License

This project is licensed under the MIT License - see the LICENSE.md file for details

About

Java Compile Engine: The CompileEngine You Need for your Project!

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages