including an icon into a self-contained JavaFX application (.exe)

前端 未结 2 706
不思量自难忘°
不思量自难忘° 2020-12-01 14:39

Followed the instructions here and here. I am using JDK 7u9 and NetBeans 7.2.1. What I did was create the whole path relative to my project

相关标签:
2条回答
  • 2020-12-01 15:16

    Found the answer here. It appears that the guidelines posted on the Oracle's website are currently mismatching the actual deployment scenarios available. Namely, when dealing with NetBeans, ant is unaware of the current directory that is presumed to be your root project. As it has been suggested in the according forum thread - simply add the directory containing "package/windows/${projectname}.ico" to ant's classpath and it will pick up the relevant resource, even though the tutorial claims that this should happen automatically due to the existing (?) addition of '.' to the build script.

    todo

    0 讨论(0)
  • 2020-12-01 15:25

    After trial and error and using XXL answer i post a more clear way of adding your custom icon into a JavaFX self contained. By the way am using Netbeans 7.3 JDK 1.7u17 1. Begin with creating a folder named package inside the folder(has the same name as your project) found in your project src directory.

    win 2. under the folder package, create the folder windows and this is where you will place your custom icon.please ensure the name of your .ico file is the same as the application name enter image description here Note: this could have easily be done in netbeans by creating a new package but for some reason, netbeans does not allow your to name a new package 'package' enter image description here

    1. Next your add the directory containing /package/windows/.ico to Ant clathpath properties enter image description here
    2. Clean & Build your project and the final output will look something like this with your custom icon enter image description here
    0 讨论(0)
提交回复
热议问题