Cannot start simulation
PhamAlexT opened this issue · comments
Environment
- OS: Arch-based distribution
- Java version: openjdk 19.0.2 2023-01-17
- Gnuplot installed
Error message
Error: Could not find or load main class peersim.Simulator
Caused by: java.lang.ClassNotFoundException: peersim.Simulator
plot
^
"./all.gpt" line 11: function to plot expected
Steps to reproduce the bug
- Create a folder in the res/ directory as mentionned in the README.md (e.g results/)
- Launch the follow command:
res/script/run.sh res/db/iris_setosa_versicolor_train.dat res/db/iris_setosa_versicolor_eval.dat 100 res/config/no_failure_applying_more_learners_voting10.txt res/results/
Expected behavior
The simulation starts and ends, outputting the results in the res/results/ folder.
Reasons
The variable cp in run.sh is incorrectly formatted due to the variable cpdelim being badly defined.
Fix used to solve this Issue
In run.sh, replace
export cpdelim=`java -help 2>&1 | grep -A 1 "classpath" | tail -n 1 | awk '{print $2}'`
with
export cpdelim=`java -help 2>&1 | grep -A 1 "class-path" | tail -n 1 | awk '{print $2}'`
Sincerely,