"How to set/initialize the repository in java?"

mdc
mdc New Altair Community Member
edited November 5 in Community Q&A

Hi,

I am trying to run an xml process file in java. The process file includes access to the repository, however I couldn't figure out how to set the repository location in the program. I assume that it should be a reference to the 'repositories.xml' in ~/.Rapidminer5 directory.

Can someone show me the line of codes I need? I've been searching the forum and I couldn't get any reference.

thanks,
matthew

Here's the code:

import java.io.File;
import java.io.IOException.*;
import com.rapidminer.RapidMiner;
import com.rapidminer.operator.IOContainer;
import com.rapidminer.operator.OperatorException;

public class Main {

    public static void main(String[] args) {

        RapidMiner.init();

        System.setProperty("rapidminer.home", "/home/matthew/rapidminer");
        com.rapidminer.Process process = null;
        try {
            process = new com.rapidminer.Process(new File("/home/matthew/Sample.xml"));
        } catch (Exception e) {
            System.out.print("error here 1");
        }

        if (process != null) {
            IOContainer result = null;
            try {
                result = process.run();
            } catch (OperatorException e) {
                System.out.print("error here 2");
            }
        }
    }
}
Tagged:

Answers

  • land
    land New Altair Community Member
    Hi,
    I don't know in the moment, but I refer you to the upcoming integration white paper that will deal with this issue.

    Greetings,
      Sebastian