The OpenNET Project / Index page

[ новости /+++ | форум | теги | ]

Поиск:  Каталог документации / Документация по FreeBSD / Руководства по FreeBSD на английском

2 The Java Environment

Ensure that you have the current ports collection as make it will fail if it attempts to build older source. You can upgrade your entire ports collection by using CVSup. See ../../books/handbook/cvsup.html for more information. You can also download the ports you need manually from ftp://ftp.FreeBSD.org/pub/FreeBSD/branches/-current/ports/ to get you going.

Note: You will need the Linux Emulation (Linux-ABI) enabled in your kernel configuration. Simply add the following option to your kernel configuration file and recompile it. Instructions for building a kernel can be found in the FreeBSD Handbook.

    options        COMPAT_LINUX

The above option will add Linux-ABI support to your kernel, when it is recompiled.

The list of dependencies below, are required to be installed manually in a certain order. Dependencies that are automatically downloaded are not listed here.

You will need to get the following:

  1. Download bsd-jdk131-patches-5.tar.gz from http://www.eyesbeyond.com/freebsddom/java/jdk13.html and place it under /usr/ports/distfiles.

  2. Next get out your web browser and head on over to http://java.sun.com/j2se/1.3/download-linux.html and find SDK downloads. Click on the ``continue'' button below ``GNUZIP Tar Shell Script''. Be sure you read every word of the license page before you click on the ``Accept'' button! You will be brought to a page titled ``Download Java(TM) 2 SDK, Standard Edition 1.3.1_02''. Scroll to the bottom and click on the ``HTTP download'' button. When the ``File Download'' box comes up, be sure to click on the ``Open'' button rather than the ``Save'' button. You will be presented with another ``File Download'' box - this time choose ``Save'' and you will be able to save j2sdk-1_3_1_02-linux-i386.bin. Place it in /usr/ports/distfiles.

  3. Go to http://www.sun.com/software/java2/download.html. In the table under Produce Description, named Java 2 SDK 1.3.1, go to the right-hand cell and click ``download''. You will be taken to the ``Sign On'' page, where you must sign in if you already have an account, or register for access. Once you have signed on, you will be taken to the ``Legal'' page, where you must accept the license agreement; scroll down (reading the license) and click on the ``Continue'' button. Next page, is the ``Receipt'' page. This is where you will save you order number. You will be able to choose the location that is nearest to you. Click on ``Java 2 SDK, Standard Edition, version 1.3.1''. Save the j2sdk-1_3_1-src.tar.gz to the /usr/ports/distfiles/ directory.

Note: It is very important for you to read the License Agreement which has been issued by Sun Microsystems Corp. There are several restrictions in place on the use of Java, which you must address. The FreeBSD Project does not take any responsibilities for your actions.

Do not discard any of the downloaded files, as they will be needed for building some of the native ports for FreeBSD, which are discussed later on.

Now that you have assembled all the source files and ports, you need to start by building java/linux-jdk13:

    # cd /usr/ports/archivers/gtar; make all install clean
    # cd /usr/ports/archivers/unzip; make all install clean
    # cd /usr/ports/archivers/zip; make all install clean

And finally:

    # cd /usr/ports/java/linux-jdk13
    # make all install clean

Once you have built java/linux-jdk13, you need to test it, to make sure it works as intended. To do that:

    # cd /usr/local/linux-jdk1.3.1/bin
    # ./java -version

The output of the above command should be as follows:

    java version "1.3.1_02"
    Java(TM) 2 Runtime Environment, Standard Edition (build 1.3.1_02-b02)
    Classic VM (build 1.3.1_02-b02, green threads, nojit)

If you did not get the correct response, you need to:

    # cd /usr/ports/java/linux-jdk13
    # make deinstall

And make sure that /usr/local does not contain a linux-jdk1.3.1 directory. If you find a fragment of the directory, delete it. Repeat the build and install process for java/linux-jdk13.

To make the native Java Development Kit 1.3.1 for FreeBSD, do the following:

  1. Make sure you have the j2sdk-1_3_1-src.tar.gz file in your /usr/ports/distfiles. This file is needed for applying the ``patch-sets'' discussed below.

  2. You will need to download the patch set for building the port. The patch-set file is called bsd-jdk131-patches-6.tar.gz. You should also make sure the integrity of the files by matching it with the following MD5 checksum.

        MD5 (bsd-jdk131-patches-6.tar.gz) = 9cade10b81d6034fdd2176bef32bdbf9
    

    The patch-set is available from: http://www.eyesbeyond.com/freebsddom/java/index.html

The last procedure discussed above (building the native jdk) will take some time.

This, and other documents, can be downloaded from ftp://ftp.FreeBSD.org/pub/FreeBSD/doc/.

For questions about FreeBSD, read the documentation before contacting <questions@FreeBSD.org>.
For questions about this documentation, e-mail <doc@FreeBSD.org>.




Партнёры:
PostgresPro
Inferno Solutions
Hosting by Hoster.ru
Хостинг:

Закладки на сайте
Проследить за страницей
Created 1996-2024 by Maxim Chirkov
Добавить, Поддержать, Вебмастеру