This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
The user is allowed currently to select .jpg, .gif, and .png for the app icon. I have tested this defect with module suites. jnlp.xml is merely copying the image file and renaming it as master.png, with no regards to file format. JNLP 1.5 is incapable of reading PNG files. As soon as it encounters a non-supported file extension in master.jnlp (as well as branding.jnlp), it will not attempt to load the file. JNLP 1.6 is still able to load the file. It's recommended that jnlp.xml extract the file extension of the image file, and use that to modify master.jnlp/branding.jnlp accordingly (along with copying the image while maintaining the file extension).
My current workaround in my build.xml: <target name="build-jnlp" depends="-pre-build-jnlp,suite.build-jnlp"> <property name="jnlp.dest.dir" value="build/jnlp" /> <pathconvert property="image.ext"> <path path="${app.icon}"/> <mapper type="regexp" from="^(.*)\.(.*)$$" to="\2"/> </pathconvert> <delete file="${jnlp.dest.dir}/master.png" failonerror="false" /> <copy file="${app.icon}" tofile="${jnlp.dest.dir}/master.${image.ext}" failonerror="false"/> <copy file="${jnlp.dest.dir}/master.jnlp" tofile="${jnlp.dest.dir}/master.jnlp.bak"> <filterchain> <replacestring from="master.png" to="master.${image.ext}"/> </filterchain> </copy> <move file="${jnlp.dest.dir}/master.jnlp.bak" tofile="${jnlp.dest.dir}/master.jnlp" overwrite="true" /> <!-- The following line will not fail if the branding.jnlp is not present, e.g. when the main file was generated using harness from 5.x days. --> <copy file="branding.jnlp" tofile="${jnlp.dest.dir}/branding.jnlp.bak" failonerror="false"> <filterchain> <replacestring from="master.png" to="master.${image.ext}"/> </filterchain> </copy> <move file="${jnlp.dest.dir}/branding.jnlp.bak" tofile="${jnlp.dest.dir}/branding.jnlp" overwrite="true" /> <!-- Build the WAR again with the corrected icon and jnlp files --> <war basedir="${jnlp.dest.dir}" destfile="dist/${app.name}.war" webxml="build/tmp/web.xml"> <zipfileset dir="${jnlp.servlet.jar}/.." file="${jnlp.servlet.jar}" prefix="WEB-INF/lib"/> </war> </target>
Created attachment 68577 [details] Patch to jnlp.xml to properly copy image file w/ correct file extension for JNLP desktop icon
Reassigning to "javawebstart".
I think that this is part of platform javawebstart support.
Patch looks reasonable to me.
if the patch is reasonable then we should use it for 6.5 However there might be legal issues. cappicard, you have to sign Contributor Agreement before we can apply the patch. http://wiki.netbeans.org/NetBeansUserFAQ#section-NetBeansUserFAQ-ContributorAgreement http://www.netbeans.org/about/legal/ca.html
Patches this minor do not require a CA.
CA approved by my employer's legal department. I will be submitting it today.
patch committed into core-main #64938ceb1400, thanks for it.
Integrated into 'main-golden', will be available in build *200809200201* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress) Changeset: http://hg.netbeans.org/main/rev/64938ceb1400 User: Richard Michalsky <rmichalsky@netbeans.org> Log: #145446: patch allowing to use different file formats for jnlp app icon
v/c