I am using Eclipse to export my project into a runnable jar.
I'm using a few libraries, namely Apache commons, Java FX, and GSON.
I have added those libraries to my Build Path inside Eclipse:
When exporting, I choose to package the required libraries into the generated jar: This creates a jar called Editor.jar
However when I do "java -jar Editor.jar" I get the java.lang.ClassNotFoundException for the class EqualsBuilder which is a part of Apache commons.
I've tried copying the apache commons-lang3-3.4.jar file into the working directory. I've also tried adding "-cp commons-lang3-3.4.jar" before the "-jar". Still I always get the ClassNotFoundException.
Does anyone see what I'm missing? Thanks.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.