Adding Custom Icon for Javafx Application EXE File in Intelije

  • by

Follow this steps to add Custom Icon file in exe created in JavaFX applicaiton

  1. Create .ico and .png file of Custom Icon you want and place it in project Source folder (src).
  2.  Considering You have already created artifact for the application.
    (if not follow this link
  3.  You need to build your application by Build->Build Artifact ->Build 
    (Let It complete building )
  4.  Go to .idea->artifacts->projectname.xml  open the file 
  5.  Under tag enter last element option as following and value as path to icon  
  6. <option name="icons">
        <option name="linuxIcon" value="$PROJECT_DIR$/src/Controller/logo.png" />
        <option name="windowsIcon" value="$PROJECT_DIR$/src/Controller/logo.ico" />
  7. Now clean and rebuild the project your exe file will now have the icon you want in javafx application.
    (if you still dont see Icon, clear cache of intelije and restart and manually delete file in out folder and then rebuild the project ).
  8. And Follow deployment using ANT so it will create EXE with icon file Custom Icon

Leave a Reply

Your email address will not be published. Required fields are marked *