I have been able to change the runtime icon using this example like this
getFrame().setIconImage(Toolkit.getDefaultToolkit().getImage(getClass() .getClassLoader().getResource("MyProject/resources/myIcon.png")));
but is there a way to tell NetBeans to use myIcon.png for the executable jar file (MyProject/dist/MyProject.jar) icon?
First step: Put your image in a defined location in your JAR-file. If you put it into the src-folder, maybe your IDE or your build-tool will package it to the JAR automatically. Otherwise check the documentation of your IDE/build-tool, in which location you have to put it.
You can use the JAR file editor to view or edit JAR file information that is stored in a data development project. If you make changes to JAR file information using the editor, you must deploy the JAR file to the database server again to apply the changes to the server version of the JAR file.
Replies (1) Jar files are Java files, ordinary exe files cannot be converted to jar files, because the original application would not have been coded in Java . . Jar to exe can convert a jar file to an exe, by including the java runtime inside the exe file, that does not work the other way around . ..
A launch wrapper is the solution, I use launch4j, a cross platform lightweight wrapper
launch4j website
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With