🎉Community Raffle - Win $25

An exclusive raffle opportunity for active members like you! Complete your profile, answer questions and get your first accepted badge to enter the raffle.
Join and Win

Fail to run rapidminer in java runable jar

User: "mercyforever"
New Altair Community Member
Updated by Jocelyn

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.

Find more posts tagged with