Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IcedTea-Web not launching JNLP files with icon SIZE="AAxBB" in the file #867

Closed
atfield90 opened this issue Apr 15, 2022 · 6 comments
Closed

Comments

@atfield90
Copy link
Contributor

Hi everyone,

i noticed that IcedTea-Web is unable to launch jnlp files that contains the function size to scale icon size, here's and example:
<icon href="http://downloadcomunica.infocamere.it/comunica_webinstaller/comunica/RBcomunica48.gif" size="48x48"/>

The above one is just an example.
I know that modifying size="48x48" into width="48" height="48" fixes the problem, but since some developer still uses the size function, is it possible to implement something in IcedTea-Web that makes it compatible with size function?

Here's the error when you try to launch a jnlp with size function in it:

net.sourceforge.jnlp.LaunchException: Fatal: Read Error: Could not read or parse the JNLP file. You can try to download this file manually and send it as bug report to IcedTea-Web team.
at net.sourceforge.jnlp.Launcher.fromUrl(Launcher.java:489)
at net.sourceforge.jnlp.Launcher.launch(Launcher.java:289)
at net.sourceforge.jnlp.runtime.JnlpBoot.run(JnlpBoot.java:67)
at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:280)
at net.sourceforge.jnlp.runtime.Boot.run(Boot.java:63)
at java.security.AccessController.doPrivileged(Native Method)
at net.sourceforge.jnlp.runtime.Boot.main(Boot.java:220)
Caused by: java.lang.RuntimeException: java.lang.NumberFormatException: For input string: "48x48"
at net.sourceforge.jnlp.JNLPFile.parse(JNLPFile.java:889)
at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:233)
at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:215)
at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:200)
at net.sourceforge.jnlp.JNLPFile.(JNLPFile.java:186)
at net.sourceforge.jnlp.Launcher.fromUrl(Launcher.java:453)
... 6 more

Thanks in advance for your help,

Leonardo

@janakmulani
Copy link
Contributor

https://docs.oracle.com/javase/8/docs/technotes/guides/javaws/developersguide/syntax.html does not specify "size" as an attribute for icon or applet.

ITW has code to read size attribute for the icon tag but parses it as integer instead of as String and then extracting w and h from it.

We will try to fix it in a future release but it is low priority.

However, you could fix it in the Parser.getIcon() method and raise a PR.

@atfield90
Copy link
Contributor Author

Hi @janakmulani, i've raised a PR to fix the problem, number #869.

I'm trying to compile this fork that i made in order to test it in windows, but when I try to compile it I always get this error message:
"+ which cargo
which: no cargo in (/usr/bin:/usr/local/bin:/usr/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files (x86)/ConfigMgr 2012 Toolkit R2/ClientTools:/cygdrive/c/Program Files (x86)/IBM/Notes:/cygdrive/c/Program Files/IcedTeaWeb/WebStart/bin:/cygdrive/c/Maven/bin:/cygdrive/c/Git/cmd:/cygdrive/c/64bit/wix/bin:/cygdrive/c/Program Files (x86)/Google/Chrome/Application:/cygdrive/c/Program Files/Zulu/zulu-8/bin:/cygdrive/c/WINDOWS/system32:/cygdrive/c/WINDOWS:/cygdrive/c/WINDOWS/System32/Wbem:/cygdrive/c/WINDOWS/System32/WindowsPowerShell/v1.0:/cygdrive/c/WINDOWS/System32/OpenSSH:/cygdrive/c/Program Files (x86)/ConfigMgr 2012 Toolkit R2/ClientTools:/cygdrive/c/Program Files (x86)/IBM/Notes:/cygdrive/c/Program Files/IcedTeaWeb/WebStart/bin:/cygdrive/c/Git/cmd)

  • '[' cargo = none ']'
  • echo 'no cargo; can not build native launchers'
  • exit 1
    no cargo; can not build native launchers"

[ERROR] Failed to execute goal org.codehaus.mojo:exec-maven-plugin:1.6.0:exec (build-launchers) on project icedtea-web-launchers: Command execution failed.: Process exited with an error: 1 (Exit value: 1) -> [Help 1]

Is Someone able to help me for this error?or otherwise, can someone compile an msi of the fork that I mad in order for me to test it in Windows?

Thanks.

Leonardo

@janakmulani
Copy link
Contributor

Hi, I am not familiar with building ITW and its installer. However I took your fix and created a branch icon_size_attr and tested it on windows by building OpenWebStart. It works. I have created a PR to be merged after review.

@atfield90
Copy link
Contributor Author

Hi @janakmulani, would you be able by any chance to share the OpenWebStart version that you builded? Thanks.

@janakmulani
Copy link
Contributor

Sure. Can you please send an email to [email protected]?

@atfield90
Copy link
Contributor Author

Issue has been solved with the merged PR, #869. We can close this one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants