jarファイルを開くと、main/resourceフォルダにfxmlのリストが表示されますが、それでも "java.lang.NullPointerException:Location is required"が表示されます。エラー。IntelliJはjarに "java.lang.NullPointerException:Location is required"を与えています。
package fxproject;
import javafx.application.Application;
import javafx.fxml.FXMLLoader;
import javafx.scene.Parent;
import javafx.scene.Scene;
import javafx.stage.Stage;
public class ApplicationSplashScreen extends Application
{
Stage window;
public static void main(String args[])
{
launch(args);
}
@Override
public void start(Stage primaryStage) throws Exception
{
window = primaryStage;
loadDatabaseScreen();
window.close();
}
private void loadDatabaseScreen()
{
try
{
Stage stage = new Stage();
Parent root = FXMLLoader.load(getClass().getResource("../main/resources/DatabaseSettingsForm.fxml"));
Scene scene = new Scene(root);
stage.setScene(scene);
stage.sizeToScene();
stage.show();
}
catch(Exception e)
{
new OrchidAlertBox("Error",e.toString());
}
}
}
文字列から '../ main/resources /'を削除してみてください。 –