Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
 package com.github.stephanenicolas.ormgap;
 
 import java.io.File;
Create the ORM Lite config file. Allows to fully test the task.

Author(s):
SNI.
public class CreateOrmLiteConfigAction {
    private static final String ERROR_DURING_CREATION_CONFIG_FILE
        = "An error occurred during creation of ORM Lite config file.";
    private final File configFile;
    private File searchDir;
    private String classpath;
    private final OrmLiteConfigUtil ormLiteConfigUtil = new OrmLiteConfigUtil();
    public CreateOrmLiteConfigAction(File configFile,
                                     File searchDir,
                                     String classpath) {
        this. = configFile;
        this. = searchDir;
        this. = classpath;
    }
    public void execute() throws IOExceptionInterruptedException {
        ProcessBuilder builder
            = new ProcessBuilder("java",
                                 "-cp",
                                 ,
                                 "com.github.stephanenicolas.ormgap.OrmLiteConfigUtil",
                                 .getAbsolutePath(),
                                 .getAbsolutePath());
        builder
            .inheritIO()
            .directory();
        final int result = builder.start().waitFor();
        if (result != 0) {
            throw new RuntimeException("OrmLiteConfigUtil finished with code: " + result);
        }
    }
New to GrepCode? Check out our FAQ X