I'm really new to Java so this might be a very easy one to solve. I'm having trouble in compiling my main .class file because of an import I do in the script. I have two imports that are both in the same "directory" (they come from the same .jar file. MqttMessage comes first in the code):
import org.eclipse.paho.mqttv5.common.MqttMessage;
import org.eclipse.paho.mqttv5.common.MqttException;
There comes no error with the import of MqttMessage, however there's an error when the program tries to import MqttException:
Error: Unable to initialize main class exemplo.Main
Caused by: java.lang.NoClassDefFoundError: org/eclipse/paho/mqttv5/common/MqttException
From what I can gather this error is related to the position of the classes, "directory" wise. However, considering these two classes are in the same "directory" I really don't know what the actual problem is or see how this could be solved. Any help would be very much appreciated.