From owner-freebsd-java Fri Nov 16 8:40:27 2001 Delivered-To: freebsd-java@freebsd.org Received: from smtp.bmi.net (smtp.bmi.net [204.57.191.31]) by hub.freebsd.org (Postfix) with ESMTP id E6D4237B405; Fri, 16 Nov 2001 08:40:13 -0800 (PST) Received: from johncoop.MSHOME (drumheller-router.bmi.net [206.63.201.3] (may be forged)) by smtp.bmi.net (Pro-8.9.3/Pro-8.9.3) with ESMTP id QAA27631; Fri, 16 Nov 2001 16:47:52 -0800 Date: Fri, 16 Nov 2001 08:40:05 -0800 From: John Merryweather Cooper To: Ernst de Haan Cc: freebsd-java@freebsd.org, freebsd-ports@freebsd.org Subject: Re: A Modest Proposal for Java(tm) dependency selection among ports Message-ID: <20011116084005.A40560@johncoop.MSHOME> References: <20011115130202.E33074@johncoop.MSHOME> <200111161042.fAGAg8V55897@zaphod.euronet.nl> Mime-Version: 1.0 Content-Type: text/plain; format=flowed; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit In-Reply-To: <200111161042.fAGAg8V55897@zaphod.euronet.nl>; from znerd@freebsd.org on Fri, Nov 16, 2001 at 02:42:08 -0800 X-Mailer: Balsa 1.2.3 Lines: 178 Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org On 2001.11.16 02:42 Ernst de Haan wrote: > John, > > The problem you are addressing is one that has been discussed a few > times > before. But up until now, no solution was implemented. Now that I'm a > member > of the FreeBSD Project, I'm determined to find a solution for this. > :-) > > > bsd.port.mk (probably through a bsd.java.mk) would provide the > > following knobs: > > So far this sounds good. > > > USE_JAVA=[yes|no] knob will succeed on any of JDK's 1.3.1, > > 1.2.2, or 1.1.8 IN THAT ORDER (latest > > version first) > > USE_JAVA2=[yes|no] knob will succeed on either JDK 1.3.1 or > > 1.2.2 IN THAT ORDER > > USE_JAVA11=[yes|no] knob will succeed on ONLY JDK 1.1.8 > > I'm suggestion a solution that's a bit different: If a port wants to > use > Java, then it should set either of the following flags: > > [ Note that a JDK is a JRE plus development tools ] > My thought here is that a "black box" application, where the user could care less if it's Java(tm) under the hood, is a very good candidate for a JRE, but the nature of development tools is that they need a JDK (debugging sucks without a debugger, etc.) > USE_JAVA=[yes|no] --> This port needs any JRE/JDK, version 1.1 or > higher. If > a JRE/JDK is installed, then this port will succeed. If not, then any > JRE > will be installed. The preference order for a JRE/JDK to be installed > is > stored somewhere in /usr/ports/Mk and it should be possible to > override this > setting in some config file, similar to the way the order for GNOME > download > sites can be tweaked. > Preferrably the order should take the following rules into account: > [1] A JRE/JDK with a higher version number is preferred over one with > a lower > version number > [2] A native FreeBSD JDK/JRE is preferred over a non-native JDK > [3] A JRE/JDK that has no dependencies on other JDKs is preferred over > a JDK > that does > [4] A JRE/JDK that can be installed without fetching any files > manually is > preferred over one that fails with a message like "You must manually > fetch > the JDK from , place it in /usr/ports/distfiles > and then > run make again" > [5] A JRE is preferred over a JDK > > USE_JAVA_1_1=[yes|no] --> This is synonymous to USE_JAVA > > USE_JAVA_1_2=[yes|no] --> This port needs any JRE/JDK (1.2+). If a > JRE/JDK > 1.2 port is installed, then this port will install, otherwise it will > fail, > *or* (preferrably!!!!) install a JRE/JDK, using the rules layed out > above > > USE_JAVA_1_3=[yes|no] --> Similar to USE_JAVA_1_2, but then 1.3 i.s.o. > 1.2 > > USE_JAVA_1_4=[yes|no] --> Similar to USE_JAVA_1_3, but for 1.4 i.s.o. > 1.3 > In my experience (yours may be different), the dividing line for most apps is whether they work better (or at all) with a Java or Java2 JRE/JDK. I've yet to find an app/tool that whines too much about the many variations of Java2 (1.2.x and up), but many are unhappy with first generation Java (1.1.8 and before)--and vice versa. Hence, following IBM's breakdown--call one set JAVA11 and the other set JAVA2. Getting more fine-grained than necessary leads back to the current situation--where I effectively have ALL the JDK's installed. In reality, two should cover most of the known world. People who simply must have every JDK can still install them. :) > USE_JDK=[yes|no] --> Similar for USE_JAVA, but now mandates a JDK, > just a JRE > won't do > > USE_JDK_11=[yes|no] --> Synonym for USE_JDK > > USE_JDK_12=[yes|no] --> See USE_JDK_11, but for 1.2 i.s.o. 1.1 > > USE_JDK_13=[yes|no] --> See USE_JDK_12, but for 1.3 i.s.o. 1.2 > > USE_JDK_14=[yes|no] --> See USE_JDK_13, but for 1.4 i.s.o. 1.3 > My thought here is that a single JDK versus JRE switch can be used to influence the version selection mechanism--and avoid proliferating switches unnecessarily. > > WANT_LINUX_JAVA=[yes|no] > > same as above except Linux version Java's > > are used and USE_JAVA11 will abort build. > > I suggest not introducing this flag in the first phase. We can discuss > it's > usefullness later. > I can definitely understand why! But, practically, a user who wants Java(tm) only/mostly for her favorite Linux application--Star Office is an example--wants a JRE/JDK that works (I can almost get Star Office to do Java with a Linux JDK--no dice (probably because there's no emulator support) for a native JDK). Of course, the solution is native versions of BOTH the JDK/JRE and the application. At the glacial rate this is happening with Sun, some of us may need to chain themselves to the front doors of their main office and chant "Free BSD" until the powers-that-be allow native binaries . . . (rant off--sorry) > > WANT_JRE_ONLY=[yes|no] > > same as above except a JRE will be used > > instead of a JDK, if available > > See above proposed solution. > > > JAVA_VER reports Java(tm) detected or built by > > USE_JAVA* > > Hmm, what *exactly* would you like this variable to return as its > value? > CLASSPATH and/or environment variable construction for an install-user script on the Makefiles. For example, a whole host of environment variables need to be correctly set for my NetRexx port to function. If they're not set correctly, the port acts like it is broken. But unless I get really tyrannical (YOU user SHALL have the following ports installed and NO OTHERS . . .) it's not practical to construct such a script. NetRexx will run with ANY of the JDK's. But which one to setup? That is the problem. If I know: 1) whether or not it is linux based on the WANT_LINUX_JAVA flag; and 2) what JAVA_VER it is (1.1.8, 1.2.2, etc.), I can construct the necessary environment variables. In fact, for Java2 (if I know Java2 is the target), I can install my JAR file in the EXT portion of the JDK tree and eliminate setting/changing the CLASSPATH (same also with JGNAT). But I don't know, so I can't. > > > Ernst > > -- > Ernst de Haan > EuroNet Internet B.V. > > "Come to me all who are weary and burdened > and I will give you rest" -- Jesus Christ > Nice quotes are left. :) -- jmc || MacroHard -- \ || the perfection of form over | ----------------------------------|| substance, marketing over | Web: http://www.borgsdemons.com || performance, and greed over | || design . . . | =======================================================================/ Public Key: http://www.borgsdemons.com/Personal/pgpkey.asc | =======================================================================\ To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message