2

I managed to package a java application from Netbeans to an EXE following this article: https://netbeans.org/kb/docs/java/native_pkg.html#tool

I could not find a way to set the application Icon. Any tips would be greatly appreciated. Thanks!

skiwi
  • 66,971
  • 31
  • 131
  • 216
melkhaldi
  • 899
  • 2
  • 19
  • 40

4 Answers4

1

RMB(click Right Mouse Button) on Project> click on Properties> Build > Deployment.

Tick (check) "Enable Native Package" button.

Click on the "Icons and Splash Image" Edit button. From there, you can browse to locate Splash Image, and Native Package Icon you want.

Click "OK" > "OK". You are ready to go!

Wolex
  • 11
  • 1
  • Follow up: Please note that only .ico images will work. You need to convert your image to .ico file (Free converter here: http://www.nchsoftware.com/imageconverter/). Name your ico image same name as your project name, then copy and paste the image file in the src folder and follow the steps I wrote ealier. Make sure you clean and build your project before you package it. I works for me. :) – Wolex Jun 29 '17 at 09:36
  • I see a splash screen option under Application, but there is no Icons and Splash Image Edit button under Build-> Deployment. The Enable Native Packing checkbox is ticked. – Brian Knoblauch Sep 06 '18 at 21:06
0

Go to your Project Properties -> Build -> Deployment.

There will be an option to enable native packaging and set native icon and splash screen.

Click on that and select the icon file you want to set as your application icon for the native exe.

After doing this, you will have to package your application again.

If this doesn't work, follow the steps over here... including an icon into a self-contained JavaFX application (.exe)

Community
  • 1
  • 1
Anmol Mahatpurkar
  • 541
  • 1
  • 4
  • 13
  • 1
    Hi, I have the enable packaging checked already. But I can't find where to set an icon. With regards to the Splash screen, there is a place in the "Application", that says "Splash Screen". I sat it to a PNG file. but it does not work. – melkhaldi Mar 16 '14 at 20:12
  • Check out the edited answer. I posted a link which could help you. – Anmol Mahatpurkar Mar 17 '14 at 07:52
0

In Netbeans open the file project.properties and add the follwing line (replacing the path with the one of your icon file): deploy.icon.native=C:\\icons\\my_icon.ico

blu
  • 1
  • 4
0

I have tried it on NetBeans 8.2 and it worked.

  1. Open project.properties file in nbproject folder.
  2. Add the following line to that file. "deploy.icon.native=C:\Location\Of_The\Icon\AppName.ico"
  3. "Clean and Build" the project (Right mouse click on project)
  4. Finally, choose "Package as" => "Image Only" from the right click menu.

The new build application should be in your dist folder with the new icon. Please note that only .ico images will work. The icon file name should be the same as your application(project).

macmuri
  • 115
  • 7