The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here
"How to set/initialize the repository in java?"
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:
0
Answers
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