diff options
author | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-30 01:30:44 +0000 |
---|---|---|
committer | Gurusamy Sarathy <gsar@cpan.org> | 1998-11-30 01:30:44 +0000 |
commit | 93e0cdbd0f68fd8d8d75c3510f7893c1ebaa26ae (patch) | |
tree | a6c84af1c502bc73fa1730324995f4e1fcb207b3 /jpl/get_jdk/README | |
parent | a8710ca18eb34a984d0dfab8503448f77a53b379 (diff) | |
parent | 57dea26d80db9a1b455ef89cc843930fe18b0369 (diff) | |
download | perl-93e0cdbd0f68fd8d8d75c3510f7893c1ebaa26ae.tar.gz |
branch jpl from perlext to perl
p4raw-id: //depot/perl@2410
Diffstat (limited to 'jpl/get_jdk/README')
-rw-r--r-- | jpl/get_jdk/README | 74 |
1 files changed, 74 insertions, 0 deletions
diff --git a/jpl/get_jdk/README b/jpl/get_jdk/README new file mode 100644 index 0000000000..0c38ccf7fd --- /dev/null +++ b/jpl/get_jdk/README @@ -0,0 +1,74 @@ + +This archive contains the following files: +README - the README file which explains how to use this program (this file) +get_jdk.pl - the program to download JDK +jdk_hosts - the descriptor file required by the program + +Nate Patwardhan (nvp@oreilly.com) wrote get_jdk.pl to automate the +download of JDK (Java Development Kit) from a distribution site based +on your Unix flavor. This program is based on some of the examples +found in the LWP cookbook that was included with your LWP distribution. + +Current Unix flavors that appear in the descriptor file (more +suggestions from Beta testers will be welcomed): + Solaris + Linux + FreeBSD + +To use get_jdk.pl properly, you *must* have LWP (libwww) and its +dependencies installed. Once you've installed LWP, you should be able +to use this module without any problems on any Unix flavor. + +By default, get_jdk.pl uses #!/usr/local/bin/perl in its shebang path, +so you may have to execute get_jdk.pl like: + + perl get_jdk.pl + +-OR- + + perl5 get_jdk.pl + +based on your site's Perl installation. + +get_jdk.pl reads the $^O to determine what Unix flavor you're using, +and compares the value of $^O to the first field shown in the +descriptor file, jdk_hosts. For example, $^O for Solaris versions of +Perl is: 'solaris'; Solaris is represented in the descriptor file +like: + + solaris=>ftp://ftp.javasoft.com/pub/jdk1.1/jdk1.1.3-solaris2-sparc.bin + +When get_jdk.pl reads the descriptor file, it splits the fields on +'=>', and reads them into a hash, %HOSTS. get_jdk.pl then compares +the value of $^O to $HOSTS{'osname'}, and returns the address of the +JDK distribution site if $^O eq $HOSTS{'osname'}. If there is not a +match, get_jdk.pl fails. + +get_jdk.pl represents the hostname of distribution sites in URL +format: protocol://hostname.some.com/path/filename.extension +When a URL is found, get_jdk.pl parses out the filename; this is +significant, because the output from the remote host is directed to +the file parsed from the URL. + +When you execute get_jdk.pl, you'll know it's working correctly if it +outputs something like: + + A JDK port for your OS has been found. + Contacting: + ftp://ftp.javasoft.com/pub/jdk1.1/jdk1.1.3-solaris2-sparc.bin + Attempting to download: jdk1.1.3-solaris2-sparc.bin + 0% - 1460 bytes received + 0% - 4380 bytes received + 0% - 7300 bytes received + 0% - 8192 bytes received + [etc etc etc until you reach 100%] + +Future (PRK release) versions of get_jdk.pl will allow the user to +update the descriptor file from the ora.com (oreilly.com) FTP/WWW +site. This version does not support the -update flag. + +Happy JDK'ing! :-) + +-- +Nate Patwardhan +nvp@oreilly.com |