From owner-freebsd-doc@FreeBSD.ORG Fri May 14 05:20:19 2004 Return-Path: Delivered-To: freebsd-doc@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7D08716A4CE for ; Fri, 14 May 2004 05:20:19 -0700 (PDT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id 131EE43D5C for ; Fri, 14 May 2004 05:20:18 -0700 (PDT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) i4ECKHwZ091177 for ; Fri, 14 May 2004 05:20:17 -0700 (PDT) (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i4ECKHUI091176; Fri, 14 May 2004 05:20:17 -0700 (PDT) (envelope-from gnats) Resent-Date: Fri, 14 May 2004 05:20:17 -0700 (PDT) Resent-Message-Id: <200405141220.i4ECKHUI091176@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-doc@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Herve Quiroz Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3089716A4CE; Fri, 14 May 2004 05:19:30 -0700 (PDT) Received: from arabica.esil.univ-mrs.fr (arabica.esil.univ-mrs.fr [139.124.41.108]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5F20143D5C; Fri, 14 May 2004 05:19:28 -0700 (PDT) (envelope-from rv@arabica.esil.univ-mrs.fr) Received: from arabica.esil.univ-mrs.fr (localhost.esil.univ-mrs.fr [127.0.0.1])i4ECJQa4004734; Fri, 14 May 2004 14:19:26 +0200 (CEST) (envelope-from rv@arabica.esil.univ-mrs.fr) Received: (from rv@localhost)i4ECJPDt004733; Fri, 14 May 2004 14:19:25 +0200 (CEST) (envelope-from rv) Message-Id: <200405141219.i4ECJPDt004733@arabica.esil.univ-mrs.fr> Date: Fri, 14 May 2004 14:19:25 +0200 (CEST) From: Herve Quiroz To: FreeBSD-gnats-submit@FreeBSD.org X-Send-Pr-Version: 3.113 cc: Mark Linimon cc: Greg Lewis Subject: docs/66633: [PATCH] Java section of the Porter's Handbook X-BeenThere: freebsd-doc@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Documentation project List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 14 May 2004 12:20:19 -0000 >Number: 66633 >Category: docs >Synopsis: [PATCH] Java section of the Porter's Handbook >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-doc >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Fri May 14 05:20:17 PDT 2004 >Closed-Date: >Last-Modified: >Originator: Herve Quiroz >Release: FreeBSD 5.2.1-RELEASE-p5 i386 >Organization: >Environment: System: FreeBSD arabica.esil.univ-mrs.fr 5.2.1-RELEASE-p5 FreeBSD 5.2.1-RELEASE-p5 #3: Thu May 6 20:17:47 CEST 2004 >Description: Here is the Java section of the Porter's handbook. It is up-to-date regarding the latest additions of bsd.java.mk 2.0 commited by 4.10-RELEASE. NOTE: I don't explain anything regarding the JAVA_PREFERRED_PORT variable in this section. JAVA_PREFERRED_PORT may be used to specify a preferred JDK port (amongst the suitable ones) for JDK dependency. It allows the end-user to override the default behaviour of bsd.java.mk (which tends to use native JDKs). IMHO, this variable should be documented somewhere though, but probably not in the Porter's handbook as this information is more relevant for users than porters. Greg Lewis is CC'ed (as the commiter of bsd.java.mk 2.0) Mark Linimon is CC'ed (as he agreed sometime ago to be the reviewer) >How-To-Repeat: >Fix: Index: book.sgml =================================================================== RCS file: /home/ncvs/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml,v retrieving revision 1.401 diff -u -r1.401 book.sgml --- book.sgml 24 Apr 2004 17:39:57 -0000 1.401 +++ book.sgml 14 May 2004 11:59:45 -0000 @@ -3936,7 +3936,214 @@ Using Java - This section is yet to be written. + If your port needs a JDK to either build, run or even extract the + distfile, then it should define USE_JAVA. + + + Variables to be defined by ports that use Java + + + + + Variable + Means + + + + + USE_JAVA + Should be defined for the remaining variables to have any + effect. + + + JAVA_VERSION + List of space-separated suitable Java versions for the + port. An optional "+" allows you to specify a + range of versions (allowed values: 1.1[+] 1.2[+] 1.3[+] + 1.4[+]). + + + JAVA_OS + List of space-separated suitable JDK port operating + systems for the port (allowed values: native + linux). + + + JAVA_VENDOR + List of space-separated suitable JDK port vendors for the + port (allowed values: freebsd bsdjava sun ibm + blackdown). + + + JAVA_BUILD + When set, it means that the selected JDK port should be + added to build dependencies of the port. + + + JAVA_RUN + This variable works exactly the same as + JAVA_BUILD but regarding run + dependencies. + + + JAVA_EXTRACT + This variable works exactly the same as + JAVA_BUILD but regarding extract + dependencies. + + + USE_JIKES + Whether the port should or should not use + jikes to build. When no value is set for this + variable, the port will use jikes to build if + available. You may also explicitely forbid or enforce the use of + jikes (by setting 'no' or + 'yes'). In the later case, devel/jikes will be added to build + dependencies of the port. + + + +
+ + Below is the list of all settings a port will receive after setting + USE_JAVA: + + + Variables defined for ports that use Java + + + + + Variable + Value + + + + + JAVA_PORT + The name of the JDK port (e.g. + 'java/jdk14'). + + + JAVA_PORT_VERSION + The full version of the JDK port (e.g. + '1.4.2'). If you only need the first two + digits of this version number, use + ${JAVA_PORT_VERSION:C/^([0-9])\.([0-9])(.*)$/\1.\2/}. + + + JAVA_PORT_OS + The operating system used by the JDK port (e.g. + 'linux'). + + + JAVA_PORT_VENDOR + The vendor of the JDK port (e.g. + 'sun'). + + + JAVA_PORT_OS_DESCRIPTION + Description of the operating system used by the JDK port + (e.g. 'Linux'). + + + JAVA_PORT_VENDOR_DESCRIPTION + Description of the vendor of the JDK port (e.g. + 'FreeBSD Foundation'). + + + JAVA_HOME + Path to the installation directory of the JDK (e.g. + '/usr/local/jdk1.3.1'). + + + JAVAC + Path to the Java compiler to use (e.g. + '/usr/local/jdk1.1.8/bin/javac' or + '/usr/local/bin/jikes'). + + + JAR + Path to the JAR tool to use (e.g. + '/usr/local/jdk1.2.2/bin/jar' or + '/usr/local/bin/fastjar'). + + + APPLETVIEWER + Path to the appletviewer utility (e.g. + '/usr/local/linux-jdk1.2.2/bin/appletviewer'). + + + JAVA + Path to the java executable. Use this + for executing Java programs (e.g. + '/usr/local/jdk1.3.1/bin/java'). + + + JAVADOC + Path to the javadoc utility + program. + + + JAVAH + Path to the javah program. + + + JAVAP + Path to the javap program. + + + JAVA_KEYTOOL + Path to the keytool utility program. + This variable is availble only if the JDK is Java 1.2 or + higher. + + + JAVA_N2A + Path to the native2ascii tool. + + + JAVA_POLICYTOOL + Path to the policytool program. This + variable is available only if the JDK is Java 1.2 or + higher. + + + JAVA_SERIALVER + Path to the serialver utility + program. + + + RMIC + Path to the RMI stub/skeleton generator, + rmic. + + + RMIREGISTRY + Path to the RMI registry program, + rmiregistry. + + + RMID + Path to the RMI daemon program. This variable is only + available if the JDK is Java 1.2 or higher. + + + JAVA_CLASSES + Path to the archive that contains the JDK class files. On + JDK 1.2 or later, this is + ${JAVA_HOME}/jre/lib/rt.jar. Earlier JDK's use + ${JAVA_HOME}/lib/classes.zip. + + + +
+ + You may use the java-debug make target to get + information for debugging your port. It will display the value of many of + the forecited variables. +
>Release-Note: >Audit-Trail: >Unformatted: