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
Fail to run rapidminer in java runable jar
mercyforever
Member Posts: 8 Learner III
Hi everyone,
I use rapidminer as a library in my java project. Everything works fine if I run my project in Eclipse. But recently I export my project into a runable jar file and I am not able to run it.
I initialize the rapidminer in my main GUI: RM rm = new RM() where the constructor of RM is :
public RM(){
RapidMiner.setExecutionMode(ExecutionMode.EMBEDDED_WITHOUT_UI);
RapidMiner.init();
try {
ClassLoader classLoader = getClass().getClassLoader();
mainProcess = new Process(classLoader.getResourceAsStream(".\\RMprocess\\association-rule.rmp"));
inputOprt = mainProcess.getOperator("Read CSV");
n2bOprt = mainProcess.getOperator("Nominal to Binominal");
fpgOprt = mainProcess.getOperator("FP-Growth");
asOprt = mainProcess.getOperator("Create Association Rules");
} catch (IOException e1) {
e1.printStackTrace();
} catch (XMLException e1) {
e1.printStackTrace();
}
}
After the initialization, if I press any of the button in my GUI, I find the rm null.
@Override
public void actionPerformed(ActionEvent arg0) {
Object component = arg0.getSource();
if(component == button11){
if(rm == null){
System.out.println("rm null");
}
JFileChooser fileChooser = new JFileChooser();
if(fileChooser.showOpenDialog(this) == JFileChooser.APPROVE_OPTION){
file = fileChooser.getSelectedFile();
text1.setText(file.getName());
}
}
}
In this case, I receive "rm null" on the console.
I am urgent to fix this problem.
Thanks.
Tagged:
0
Answers
Hi,
I am late to reply, but just wondering if you were able to resolve this issue.
if not, do you see any exceptions been caught in your RM contructor