This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
add option to omit Changes file, from Abigail <abigail@delanet.com>;
[perl5.git] / jpl / get_jdk / README
CommitLineData
d50cb536
GS
1
2This archive contains the following files:
3README - the README file which explains how to use this program (this file)
4get_jdk.pl - the program to download JDK
5jdk_hosts - the descriptor file required by the program
6
7Nate Patwardhan (nvp@oreilly.com) wrote get_jdk.pl to automate the
8download of JDK (Java Development Kit) from a distribution site based
9on your Unix flavor. This program is based on some of the examples
10found in the LWP cookbook that was included with your LWP distribution.
11
12Current Unix flavors that appear in the descriptor file (more
13suggestions from Beta testers will be welcomed):
14 Solaris
15 Linux
16 FreeBSD
17
18To use get_jdk.pl properly, you *must* have LWP (libwww) and its
19dependencies installed. Once you've installed LWP, you should be able
20to use this module without any problems on any Unix flavor.
21
22By default, get_jdk.pl uses #!/usr/local/bin/perl in its shebang path,
23so you may have to execute get_jdk.pl like:
24
25 perl get_jdk.pl
26
27-OR-
28
29 perl5 get_jdk.pl
30
31based on your site's Perl installation.
32
33get_jdk.pl reads the $^O to determine what Unix flavor you're using,
34and compares the value of $^O to the first field shown in the
35descriptor file, jdk_hosts. For example, $^O for Solaris versions of
36Perl is: 'solaris'; Solaris is represented in the descriptor file
37like:
38
39 solaris=>ftp://ftp.javasoft.com/pub/jdk1.1/jdk1.1.3-solaris2-sparc.bin
40
41When get_jdk.pl reads the descriptor file, it splits the fields on
42'=>', and reads them into a hash, %HOSTS. get_jdk.pl then compares
43the value of $^O to $HOSTS{'osname'}, and returns the address of the
44JDK distribution site if $^O eq $HOSTS{'osname'}. If there is not a
45match, get_jdk.pl fails.
46
47get_jdk.pl represents the hostname of distribution sites in URL
48format: protocol://hostname.some.com/path/filename.extension
49When a URL is found, get_jdk.pl parses out the filename; this is
50significant, because the output from the remote host is directed to
51the file parsed from the URL.
52
53When you execute get_jdk.pl, you'll know it's working correctly if it
54outputs something like:
55
56 A JDK port for your OS has been found.
57 Contacting:
58 ftp://ftp.javasoft.com/pub/jdk1.1/jdk1.1.3-solaris2-sparc.bin
59 Attempting to download: jdk1.1.3-solaris2-sparc.bin
60 0% - 1460 bytes received
61 0% - 4380 bytes received
62 0% - 7300 bytes received
63 0% - 8192 bytes received
64 [etc etc etc until you reach 100%]
65
66Future (PRK release) versions of get_jdk.pl will allow the user to
67update the descriptor file from the ora.com (oreilly.com) FTP/WWW
68site. This version does not support the -update flag.
69
70Happy JDK'ing! :-)
71
72--
73Nate Patwardhan
74nvp@oreilly.com