I want to export runnable JAR file of an application that creates new files into resource folder and using them to compute other operation.
I included resource folder in build path and I exported runnable JAR, but when I run this JAR and click on a button that creates those files it does nothing, while it must show something.
I think the problem is the fact of creating the files.
Here is the button listener:
package control;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.sql.SQLException;
import gui.FuzzyGUI;
import model.GetValues;
public class RunBtnListener implements ActionListener {
FuzzyGUI menu;
String logs[];
String CSVpathname;
String XESpathname;
public void actionPerformed(ActionEvent e) {
// Drop previous temp log
GetValues.dropTempLog();
// Recover log table names from splitting
if(!SplitListener.tableName.equals("none")) {
logs = GetValues.getLogsNames(SplitListener.tableName, 1); // 1 - Split
} else { // recover (single) log table name from filtering
logs = GetValues.getLogsNames(FilterListener.tableName, 0); // 0 - Filter
}
try {
for(int i = 0; i < logs.length; i++) {
CSVpathname = "res/log" + i + ".csv";
XESpathname = "res/log" + i + ".xes";
GetValues.exportToCSV(logs[i], CSVpathname);
GetValues.convertToXES(CSVpathname, XESpathname);
menu = new FuzzyGUI(XESpathname);
}
} catch (SQLException e1) {
e1.printStackTrace();
}
}
}
When I run on Eclipse it works, but when I export in runnable JAR it doesn't work.