|
Lines 105-133
Link Here
|
| 105 |
<sect1> |
105 |
<sect1> |
| 106 |
<title>Introduction</title> |
106 |
<title>Introduction</title> |
| 107 |
|
107 |
|
| 108 |
<para>The &java; programming language was birthed on <literal>May 23rd |
108 |
<para>The &java; programming language was released on <literal>May 23rd |
| 109 |
1995</literal>. One would expect that after all this time, &java; |
109 |
1995</literal>. One would expect that after all this time, &java; |
| 110 |
applications would be easy to install and ready to run from a single |
110 |
applications would be easy to install and ready to run from a |
| 111 |
package, or port on FreeBSD, thus making it available for the |
111 |
single package or port on FreeBSD, thus making it easy to use. |
| 112 |
<quote>masses</quote>. This is not the case, unfortunately, as |
112 |
This is not the case, unfortunately, as the &java; distribution is |
| 113 |
the &java; distribution is held very closely by Sun Microsystems, |
113 |
controlled very closely by Sun Microsystems, who prohibits |
| 114 |
and prohibits re-distribution. All &java; Applets must be compiled |
114 |
re-distribution. All &java; applets must be compiled from source |
| 115 |
from source code, together with the &java; Development Kit from Sun |
115 |
code, together with the &java; Development Kit from Sun |
| 116 |
Microsystems. All these ingredients must be blended together in |
116 |
Microsystems. All these ingredients must be blended together in |
| 117 |
the right order, assembled, and compiled by the end user. With |
117 |
the right order, assembled, and compiled by the end user. With |
| 118 |
such distribution philosophies at heart, it is my opinion that |
118 |
such distribution philosophies at heart, it is my opinion that |
| 119 |
&java; will always be developer or hacker use only. I certainly |
119 |
&java; on FreeBSD will always be for developer or hacker use only. |
| 120 |
found this to be true when I needed to serve up some |
120 |
I certainly found this to be true when I needed to serve up some |
| 121 |
<filename>.jsp</filename> pages for a client on my web server, |
121 |
<filename>.jsp</filename> pages for a client on my web server, and |
| 122 |
and needed to get <filename |
122 |
needed to get <filename |
| 123 |
role="package">www/jakarta-tomcat4</filename> to work with |
123 |
role="package">www/jakarta-tomcat4</filename> to work with |
| 124 |
<filename role="package">www/apache13</filename> on my FreeBSD |
124 |
<filename role="package">www/apache13</filename> on my FreeBSD |
| 125 |
system.</para> |
125 |
system.</para> |
| 126 |
|
126 |
|
| 127 |
<para>The Tomcat portion of the install is very straight forward, but |
127 |
<para>The Tomcat portion of the install is very straightforward, but |
| 128 |
the difficulty I had was getting &java; Development Kit up and |
128 |
the difficulty I had was getting the &java; Development Kit up and |
| 129 |
running for FreeBSD 4.X, as Sun Microsystems only supplies |
129 |
running on FreeBSD 4.X, as Sun only supplies |
| 130 |
Binaries for Linux, &solaris;, and &windowsnt;. This means that I |
130 |
binaries for Linux, &solaris;, and &windowsnt;. This means that I |
| 131 |
had to compile my own &jdk; for FreeBSD. I began by searching for |
131 |
had to compile my own &jdk; for FreeBSD. I began by searching for |
| 132 |
documentation on the Internet. I quickly found that there is more |
132 |
documentation on the Internet. I quickly found that there is more |
| 133 |
source code than I need along with patches to the source code, but |
133 |
source code than I need along with patches to the source code, but |
|
Lines 144-152
Link Here
|
| 144 |
<title>The &java; Environment</title> |
144 |
<title>The &java; Environment</title> |
| 145 |
|
145 |
|
| 146 |
<para>Ensure that you have the current ports collection as |
146 |
<para>Ensure that you have the current ports collection as |
| 147 |
<command>make</command> it will fail if it attempts to build older |
147 |
<command>make</command> will fail if it attempts to build older |
| 148 |
source. You can upgrade your entire ports collection by using |
148 |
source. You can upgrade your entire ports collection by using |
| 149 |
<application>CVSup</application>. See <ulink |
149 |
<application>CVSup</application>. See the <ulink |
| 150 |
url="&url.books.handbook;/cvsup.html">Using CVSup</ulink> section |
150 |
url="&url.books.handbook;/cvsup.html">Using CVSup</ulink> section |
| 151 |
of the Handbook for more information. You can also download the |
151 |
of the Handbook for more information. You can also download the |
| 152 |
ports you need manually from <ulink |
152 |
ports you need manually from <ulink |
|
Lines 154-174
Link Here
|
| 154 |
get you going.</para> |
154 |
get you going.</para> |
| 155 |
|
155 |
|
| 156 |
<note> |
156 |
<note> |
| 157 |
<para>You will need the <literal>Linux Emulation</literal> |
157 |
<para>You will need <literal>Linux Emulation</literal> |
| 158 |
(Linux-ABI) enabled in your kernel configuration. Simply add |
158 |
(Linux-ABI) enabled in your kernel configuration. Simply add |
| 159 |
the following option to your kernel configuration file and |
159 |
the following option to your kernel configuration file |
| 160 |
recompile it. Instructions for building a kernel can be found |
160 |
recompile it, and reinstall the kernel. Instructions for |
| 161 |
in the <ulink url="&url.books.handbook;/index.html">FreeBSD |
161 |
building a kernel can be found in the <ulink |
| 162 |
Handbook</ulink>.</para> |
162 |
url="&url.books.handbook;/index.html">FreeBSD |
|
|
163 |
Handbook</ulink>.</para> |
| 163 |
|
164 |
|
| 164 |
<programlisting>options COMPAT_LINUX</programlisting> |
165 |
<programlisting>options COMPAT_LINUX</programlisting> |
| 165 |
|
166 |
|
| 166 |
<para>The above option will add Linux-ABI support to your |
167 |
<para>The above option will add Linux-ABI support to your |
| 167 |
kernel, when it is recompiled.</para> |
168 |
kernel when it is next recompiled.</para> |
| 168 |
</note> |
169 |
</note> |
| 169 |
|
170 |
|
| 170 |
<para>The list of dependencies below, are required to be installed |
171 |
<para>The listed dependencies below are required to be installed |
| 171 |
manually in a certain order. Dependencies that are automatically |
172 |
manually in a the proper order. Dependencies that are automatically |
| 172 |
downloaded are not listed here.</para> |
173 |
downloaded are not listed here.</para> |
| 173 |
|
174 |
|
| 174 |
<itemizedlist> |
175 |
<itemizedlist> |
|
Lines 192-199
Link Here
|
| 192 |
</step> |
193 |
</step> |
| 193 |
|
194 |
|
| 194 |
<step> |
195 |
<step> |
| 195 |
<para>Next get out your web browser and head on over to |
196 |
<para>Next open your web browser and head over to <ulink |
| 196 |
<ulink url="http://java.sun.com/j2se/1.3/download-linux.html"></ulink> |
197 |
url="http://java.sun.com/j2se/1.3/download-linux.html"></ulink> |
| 197 |
and find SDK downloads. Click on the <quote>continue</quote> |
198 |
and find SDK downloads. Click on the <quote>continue</quote> |
| 198 |
button below <quote>GNUZIP Tar Shell Script</quote>. Be sure |
199 |
button below <quote>GNUZIP Tar Shell Script</quote>. Be sure |
| 199 |
you read every word of the license page before you click on |
200 |
you read every word of the license page before you click on |
|
Lines 205-229
Link Here
|
| 205 |
<quote>Open</quote> button rather than the <quote>Save</quote> |
206 |
<quote>Open</quote> button rather than the <quote>Save</quote> |
| 206 |
button. You will be presented with another <quote>File |
207 |
button. You will be presented with another <quote>File |
| 207 |
Download</quote> box - this time choose <quote>Save</quote> |
208 |
Download</quote> box - this time choose <quote>Save</quote> |
| 208 |
and you will be able to save |
209 |
and you will be able to get |
| 209 |
<filename>j2sdk-1_3_1_10-linux-i386.bin</filename>. |
210 |
<filename>j2sdk-1_3_1_10-linux-i386.bin</filename>. |
| 210 |
Place it in <filename>/usr/ports/distfiles</filename>.</para> |
211 |
Put it in <filename>/usr/ports/distfiles</filename>.</para> |
| 211 |
</step> |
212 |
</step> |
| 212 |
|
213 |
|
| 213 |
<step> |
214 |
<step> |
| 214 |
<para>Go to <ulink |
215 |
<para>Go to <ulink |
| 215 |
url="http://www.sun.com/software/java2/download.html"></ulink>. |
216 |
url="http://wwws.sun.com/software/communitysource/j2se/java2/download.html"></ulink>. |
| 216 |
In the table under <literal>Produce Description</literal>, |
217 |
In the table under <literal>Download Link(s)</literal>, |
| 217 |
named <literal>Java 2 SDK 1.3.1</literal>, go to the |
218 |
for <literal>Java 2 SDK 1.3.1</literal>, go to the |
| 218 |
right-hand cell and click <quote>download</quote>. You will |
219 |
right-hand cell and click <quote>Download</quote>. You will |
| 219 |
be taken to the <quote>Sign On</quote> page, where you must |
220 |
be taken to the <quote>Sign On</quote> page, where you must |
| 220 |
sign in if you already have an account, or register for |
221 |
sign in if you already have an account, or register for |
| 221 |
access. Once you have signed on, you will be taken to the |
222 |
access otherwise. Once you have signed in, you will be taken to the |
| 222 |
<quote>Legal</quote> page, where you must accept the license |
223 |
<quote>Legal</quote> page, where you must accept the license |
| 223 |
agreement; scroll down (reading the license) and click on the |
224 |
agreement; scroll down (reading the license) and click on the |
| 224 |
<quote>Continue</quote> button. Next page, is the |
225 |
<quote>Continue</quote> button. The next page is the |
| 225 |
<quote>Receipt</quote> page. This is where you will save your |
226 |
<quote>Receipt</quote> page. This is where you will save your |
| 226 |
order number. You will be able to choose the location that is |
227 |
order number. You will be able to choose the server that is |
| 227 |
nearest to you. Click on <quote>Java 2 SDK, Standard Edition, |
228 |
nearest to you. Click on <quote>Java 2 SDK, Standard Edition, |
| 228 |
version 1.3.1</quote>. Save the |
229 |
version 1.3.1</quote>. Save the |
| 229 |
<filename>j2sdk-1_3_1-src.tar.gz</filename> to the |
230 |
<filename>j2sdk-1_3_1-src.tar.gz</filename> to the |
|
Lines 235-241
Link Here
|
| 235 |
<para>It is very important for you to read the License Agreement |
236 |
<para>It is very important for you to read the License Agreement |
| 236 |
which has been issued by Sun Microsystems Corp. There are |
237 |
which has been issued by Sun Microsystems Corp. There are |
| 237 |
several restrictions in place on the use of &java;, which you must |
238 |
several restrictions in place on the use of &java;, which you must |
| 238 |
address. The FreeBSD Project does not take any responsibilities |
239 |
address. The FreeBSD Project does not take any responsibility |
| 239 |
for your actions.</para> |
240 |
for your actions.</para> |
| 240 |
|
241 |
|
| 241 |
<para>Do not discard any of the downloaded files, as they will be |
242 |
<para>Do not discard any of the downloaded files, as they will be |
|
Lines 280-306
Link Here
|
| 280 |
<procedure> |
281 |
<procedure> |
| 281 |
<step> |
282 |
<step> |
| 282 |
<para>Make sure you have the |
283 |
<para>Make sure you have the |
| 283 |
<filename>j2sdk-1_3_1-src.tar.gz</filename> file in your |
284 |
<filename>j2sdk-1_3_1-src.tar.gz</filename> file in |
| 284 |
<filename>/usr/ports/distfiles</filename>. This file is needed |
285 |
<filename>/usr/ports/distfiles</filename>. This file is needed |
| 285 |
for applying the <quote>patch-set</quote> discussed below.</para> |
286 |
for applying the <quote>patchset</quote> discussed below.</para> |
| 286 |
</step> |
287 |
</step> |
| 287 |
|
288 |
|
| 288 |
<step> |
289 |
<step> |
| 289 |
<para>You will need to download the <literal>patch set</literal> |
290 |
<para>You will need to download the <literal>patchset</literal> |
| 290 |
for building the port. The patch-set file is called |
291 |
for building the port. The patchset file is called |
| 291 |
<filename>bsd-jdk131-patches-9.tar.gz</filename>. You should |
292 |
<filename>bsd-jdk131-patches-9.tar.gz</filename>. You should |
| 292 |
also make sure the integrity of the files by matching it with |
293 |
verify the integrity of the file by checking its |
| 293 |
the following <acronym>MD5</acronym> checksum.</para> |
294 |
<acronym>MD5</acronym> checksum to make sure your copy isn't |
|
|
295 |
corrupt.</para> |
| 296 |
|
| 297 |
<screen>md5 bsd-jdk131-patches-9.tar.gz</screen> |
| 294 |
|
298 |
|
| 295 |
<programlisting> |
299 |
<programlisting> |
| 296 |
MD5 (bsd-jdk131-patches-9.tar.gz) = 29c83880d3555abcf74fc7df9db1959f</programlisting> |
300 |
MD5 (bsd-jdk131-patches-9.tar.gz) = 29c83880d3555abcf74fc7df9db1959f</programlisting> |
| 297 |
|
301 |
|
| 298 |
<para>The patch-set is available from: <ulink |
302 |
<para>The patchset is available from: <ulink |
| 299 |
url="http://www.eyesbeyond.com/freebsddom/java/index.html"></ulink></para> |
303 |
url="http://www.eyesbeyond.com/freebsddom/java/index.html"></ulink></para> |
| 300 |
</step> |
304 |
</step> |
| 301 |
</procedure> |
305 |
</procedure> |
| 302 |
|
306 |
|
| 303 |
<para>The last procedure discussed above (building the native |
307 |
<para>The last step above (building the native |
| 304 |
&jdk;) will take some time.</para> |
308 |
&jdk;) will take some time.</para> |
| 305 |
</sect1> |
309 |
</sect1> |