title: javafx application name on gnome
body: <p>I help to develop an application with JavaFX for linux and OSX. On Linux, we cannot have the application name on the gnome top bar. We have the entry point for JavaFX. The window have the good name but on gnome we have something like "com.myApp.javaFXMainClass".</p>
  
  <p>I have the same problem with swing and I was able to correct it with these code :</p>
  
  <pre><code>// Set name in system menubar for Gnome (and Linux)
  if (System.getProperty("os.name").toLowerCase().contains("linux")) {
      try {
          Toolkit xToolkit = Toolkit.getDefaultToolkit();
          Field awtAppClassNameField = xToolkit.getClass().getDeclaredField("awtAppClassName");
          awtAppClassNameField.setAccessible(true);
          awtAppClassNameField.set(xToolkit, "MyApp"); 
      } catch (Exception e) {
          // TODO
      }
  }
  </code></pre>
  
  <p>How to do that with JavaFX ?</p>