[icedtea-web] RFC: backport changeset 9397074c2c39 to icedtea-web 1.0

Deepak Bhole dbhole at redhat.com
Thu Jan 20 11:15:42 PST 2011


* Omair Majid <omajid at redhat.com> [2011-01-20 13:38]:
> On 01/20/2011 01:18 PM, Deepak Bhole wrote:
> >* Deepak Bhole<dbhole at redhat.com>  [2011-01-20 12:59]:
> >>* Omair Majid<omajid at redhat.com>  [2011-01-20 12:46]:
> >>>Hi,
> >>>
> >>>I would like to backport changeset 9397074c2c39 from icedtea-web
> >>>HEAD to icedtea-web 1.0.
> >>>
> >>>This changeset adds symlinks for javaws and itweb-settings under
> >>>JDK_HOME/jre/bin. Without this patch, JNLPs which require a new VM
> >>>to start will fail:
> >>>
> >>>$ javaws SweetHome3D.jnlp
> >>>net.sourceforge.jnlp.LaunchException: Fatal: External Launch Error:
> >>>Could not launch JNLP file.
> >>>Caused by: java.io.IOException: Cannot run program
> >>>"$JDK_HOME/jre/bin/javaws": java.io.IOException: error=2, No such
> >>>file or directory
> >>>
> >>>The backport is attached.
> >>>
> >>>Ok to commit?
> >>>
> >>
> >>The binary in jre/bin should be the actual file, not the one in
> >>JAVA_HOME/bin. JAVA_HOME/bin is optional and installed as part of the
> >>JDK. However the JRE (and all the components therein) should be
> >>independently runnable.
> >>
> >
> >Something else just came to mind... the change to Launcher.java should
> >be reverted. The patches changes the code to use java.icedtea-web.bin
> >which is defined at build time. This makes the build un-relocatable.
> >java.home is the right property to use in this situation.
> >
> 
> I didn't realize there were these issues with the patch, thanks for
> pointing them out.
> 
> From what I understand, we want two (possibly different) binaries in
> two locations such that the two binaries dont depend on each other?
> Or can $JDK/bin/javaws assume that $JDK/jre/bin/javaws exists?
> 

Hmm, the JRE is a subset of the JDK (atleast in all RPM installations
I've seen). However it seems that files are always duplicated across
JAVA_HOME/bin and JAVA_HOME/jre/bin rather than linked. Perhaps this was
to maintain consistency with Windows (which doesn't have symlinks) but I
am unsure.

Either way, perhaps we should maintain consistency and duplicate the
files as well.

> Also, how does this address the issue where $(prefix) is not a JDK
> folder (as pointed out by Andrew Hughes while he was reviewing the
> original patch [1]).
> 

I think Andrew's suggestion is correct, that jre/bin/javaws should only
be installed if prefix/jre/bin exists.  

Btw, we might have to build binaries for JAVA_HOME/jre/bin and for
JAVA_HOME/bin separately with different args as the binaries rely on
relative paths to find libjvm.so -- I haven't looked into it in detail,
but please keep that in mind when re-working the patch.

Cheers,
Deepak

> Thanks,
> Omair
> 
> [1] http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-December/011426.html



More information about the distro-pkg-dev mailing list