Re: Java Skeleton

"Hylke Donker" <[email protected]>
Newsgroups gmane.comp.autopackage.devel
Message-ID <[email protected]>
Thanks alot for the help. According to java.sun.com java should be
compatible to atleast 1.3. I've added some code to add the older versions.
If you're interested in adding my skeleton file to the skeleton-database
here's my complete skeleton file:

[Meta]
RootName: @java.sun.com/jre
DisplayName: Sun Java Runtime Environment
ShortName: sun-jre
Packager: Hylke Donker <[email protected]>
Summary: Sun's Java Runtime Environment. Needed for applications written in
the Java programming language.
Skeleton-Version: 1

[Description]
Sun's Java Runtime Environment.

[Notes]
This skeleton gets the version from the program java.

[Test]
version_info=$(java -version 2>&1)
version=$(echo $version_info | awk -F\" '{print $2}')
version=${version%_*}
INTERFACE_VERSIONS=`getMajor $version`.`getMinor $version`

# Append backwards compatible versions
minor=`getMinor $version`
let "minor -= 1"
for i in `seq 3 $minor`; do
INTERFACE_VERSIONS+=" `getMajor $version`.$i"
done

SOFTWARE_VERSIONS=$INTERFACE_VERSIONS

Hylke

On Jan 7, 2008 7:33 PM, Isak Savo <[email protected]> wrote:

> 2008/1/6, Hylke Donker <[email protected]>:
> > Hi,
> > I am trying to write a skeleton file for the Java Runtime Environment,
> but
> > for some reason my java test always fails.
>
> I did some testing of your [test] code on my machine, and it seems the
> regex is not working correctly.
>
> I changed your [Test] section to the following:
> version_info=$(java -version 2>&1)
> version=$(echo $version_info | awk -F\" '{print $2}')
> version=${version%_*} # Get the first group and remove trailing underscore
> INTERFACE_VERSIONS=`getMajor $version`.`getMinor $version`
> SOFTWARE_VERSIONS=$INTERFACE_VERSIONS
>
> and it now finds java.
>
> By the way, how does java work in terms of backwards compatibility?
> Can a 1.4 app run on 1.6? The other way around?
>
> If so, you should populate INTERFACE_VERSION with all the supported
> versions for the installed version. So, if 1.6 is backward compatible
> with 1.4 and 1.2 you should set INTERFACE_VERSIONS to "1.2 1.4 1.6"
> for java 1.6
>
> (Taj, correct me if I'm wrong above)
>
> -Isak
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: autopackage-dev-unsubscribe-OfajU3CKLf1/[email protected]
> For additional commands, e-mail: autopackage-dev-help-OfajU3CKLf1/[email protected]
>
>
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.