package pipeline;

import java.lang.reflect.Method;
import java.net.URLClassLoader;
import java.net.URL;
import java.io.File;

public class StartPipeline {
    public static void main(String[] args) {
        try {
            // Get the classpath from system property
            String classpath = System.getProperty("java.class.path");
            System.out.println("Current classpath: " + classpath);
            
            // Try to load the classes
            Class<?> owlMainClass = Class.forName("OWLpreprocessing.OWL_main");
            System.out.println("Successfully loaded: " + owlMainClass.getName());
            
            Class<?> dbfoMainClass = Class.forName("OWL2generator.DBFO_main");
            System.out.println("Successfully loaded: " + dbfoMainClass.getName());
            
            // Call main methods
            Method mainMethod1 = owlMainClass.getMethod("main", String[].class);
            mainMethod1.invoke(null, (Object) new String[0]);
            
            Method mainMethod2 = dbfoMainClass.getMethod("main", String[].class);
            mainMethod2.invoke(null, (Object) new String[0]);
            
        } catch (Exception e) {
            System.err.println("Error starting pipeline: " + e.getMessage());
            e.printStackTrace();
        }
    }
}
