How to make icon show with jpackage if in AppData
23:36 12 Aug 2026

I was trying to compile my JavaFx application to .exe, and I am trying to design it for one install per user, but when it is installed on the user's %LocalAppData% directory, the icon doesn't show, but when it's installed on the C:\Program Files directory, the icon does show.

I used this command:

jpackage --type exe --input "target" --main-jar "legacy-clipboard-1.0-jar-with-dependencies.jar" --main-class "com.gavtechmaster.Main" --name "The Legacy Clipboard" --app-version "1.0.0" --vendor "GavTechMaster" --icon "C:\Users\m6711\Downloads\legacyboard.ico" --win-shortcut --win-menu --description "The Legacy Clipboard"  --win-upgrade-uuid "0cd8f446-a1ec-444a-990c-a527a5558514" --win-dir-chooser --resource-dir "wix-resources" --win-per-user-install

And I edited the main.wxs file:




  
    
  
    
  

  
  
  

  

  
    
  
    
  
  
    
  
    
  

  

    

    

    
      
      
    

    
    
    
    
    
    

    
    

    
      
      
      
      
    

    
    
    
    

    
      
    

    
      
    

    
      
    

    
    
    
    

    

    
      Not Installed
      Not Installed
      Not Installed
      Not Installed
      
        Not Installed
      
      
        Not Installed
      
      
        Not Installed
      

      
      JP_UPGRADABLE_FOUND
      
      
      JP_DOWNGRADABLE_FOUND
      
      
    
    
      
        
      
    
  

java windows file-permissions appdata jpackage