I'm struggling with the code within my module-info.java file to when reorganizing my classes into relevant packages, my code was running fine before I moved them but i wanted to tidy up a little for future maintenance and now I'm running into trouble with location errors when running the project.
module-info.java:
module com.example.trademarket {
requires javafx.controls;
requires javafx.fxml;
requires org.controlsfx.controls;
requires org.kordamp.bootstrapfx.core;
requires java.sql;
requires org.apache.commons.codec;
//requires com.google.gson;
//requires org.apache.httpcomponents.httpclient;
//requires org.apache.httpcomponents.httpcore;
opens com.example.trademarket to javafx.fxml;
//exports com.example.trademarket;
//exports com.example.trademarket.classes;
//opens com.example.trademarket.classes to javafx.fxml;
//exports com.example.trademarket.controller;
//opens com.example.trademarket.controller to javafx.fxml;
//exports com.example.trademarket.application;
opens com.example.trademarket.application to javafx.fxml;
}
The file structure i am trying to achieve:
(https://i.stack.imgur.com/6bQWX.png)
The error message I'm getting:
Caused by: java.lang.module.InvalidModuleDescriptorException: Package com.example.trademarket not found in module
I've tried changing the 'opens' and 'exports' statements in the file but this hasn't worked yet.