Hello everyone so I am developing an app that is capable to send a message to a certain number through my API client using Nexmo. In my UsersController that I use to send the text message from it gives me an error when I run it saying:
Caused by: javafx.fxml.LoadException:
/C:/Users/man/workspace/DatabaseProgramm/target/classes/fxml/User.fxml:9
and
Caused by: java.lang.ClassNotFoundException: UsersController
I have the UsersController class defined as follows:
//Necessary imports
public class UsersController implements Initializable
{
@FXML
public static TextField txtTo;
@FXML
public static TextField txtMessage;
@FXML
public Button btnSend;
@Override
public void initialize(URL location, ResourceBundle resources)
{
try
{
String getTo = txtTo.getText();
String getMsg = txtMessage.getText();
AuthMethod auth = new TokenAuthMethod("api_key", "api_id");
NexmoClient client = new NexmoClient(auth);
TextMessage text = new TextMessage("12013514464", getTo, getMsg);
btnSend = new Button();
}catch(Exception e){}
}
@FXML
private void sendMessage() throws IOException, NexmoClientException
{
AuthMethod auth = new TokenAuthMethod("api_key", "api_id");
NexmoClient client = new NexmoClient(auth);
TextMessage text = new TextMessage("12013514464", "+12063760671", "YIKES");
SmsSubmissionResult[] responses = client.getSmsClient().submitMessage(text);
for(SmsSubmissionResult response : responses)
{
System.out.println(response);
}
}
}
In the Users.xml file I have the controller set to the Users controller:
<AnchorPane prefHeight="401.0" prefWidth="506.0" style=" " xmlns:fx="http://javafx.com/fxml/1" xmlns="http://javafx.com/javafx/2.2" fx:controller="UsersController">
Why is java saying that there is an error on the above line, and it states that there is no class UsersController? Help on this would be fantastic!