title: got error when I am running Jar file. IllegalStateException: Location is not set
body: <p>I am developing Javafx app with maven. I can run my app from Intellij idea without any exception and error. But I got error when I am running Jar file. How to solve that issue?</p>
  
  <p>I think, the below exception got at that line:</p>
  
  <pre><code>FXMLLoader loader = new FXMLLoader(this.getClass().getResource("../screen/AdminScreen.fxml"));
  </code></pre>
  
  <p>Help me, please?</p>
  
  <p>This is my exception:</p>
  
  <pre><code>Exception in thread "JavaFX Application Thread"
  java.lang.IllegalStateException: Location is not set. 
      at javafx.fxml.FXMLLoader.loadImpl(FXMLLoader.java:2459) 
      at javafx.fxml.FXMLLoader.load(FXMLLoader.java:2435) 
      at login.LoginController.signInAction(LoginController.java:101) 
      at login.LoginController.lambda$addListeners$2(LoginController.java:65)
      at com.sun.javafx.event.CompositeEventHandler.dispatchBubblingEvent(CompositeEventHandler.java:86)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:238)
      at com.sun.javafx.event.EventHandlerManager.dispatchBubblingEvent(EventHandlerManager.java:191)
      at com.sun.javafx.event.CompositeEventDispatcher.dispatchBubblingEvent(CompositeEventDispatcher.java:59)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:58)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.BasicEventDispatcher.dispatchEvent(BasicEventDispatcher.java:56)
      at com.sun.javafx.event.EventDispatchChainImpl.dispatchEvent(EventDispatchChainImpl.java:114)
      at com.sun.javafx.event.EventUtil.fireEventImpl(EventUtil.java:74)
      at com.sun.javafx.event.EventUtil.fireEvent(EventUtil.java:49) 
      at javafx.event.Event.fireEvent(Event.java:198) 
      at javafx.scene.Node.fireEvent(Node.java:8890)
  </code></pre>