Fail to run rapidminer in java runable jar

mercyforevermercyforever Member Posts: 8 Contributor I
edited November 2018 in Help

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:

Answers

  • bhupendra_patilbhupendra_patil Administrator, Employee, Member Posts: 168  RM Data Scientist

    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

Sign In or Register to comment.