From owner-freebsd-hackers Tue Mar 4 14:14:23 1997 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.5/8.8.5) id OAA19483 for hackers-outgoing; Tue, 4 Mar 1997 14:14:23 -0800 (PST) Received: from rocky.mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by freefall.freebsd.org (8.8.5/8.8.5) with ESMTP id OAA19465 for ; Tue, 4 Mar 1997 14:14:11 -0800 (PST) Received: (from nate@localhost) by rocky.mt.sri.com (8.7.5/8.7.3) id PAA01575; Tue, 4 Mar 1997 15:10:45 -0700 (MST) Date: Tue, 4 Mar 1997 15:10:45 -0700 (MST) Message-Id: <199703042210.PAA01575@rocky.mt.sri.com> From: Nate Williams MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit To: Terry Lambert Cc: somsky@dirac.phys.washington.edu (William R. Somsky), hackers@freefall.freebsd.org Subject: Re: java support under FreeBSD. In-Reply-To: <199703042044.NAA10311@phaeton.artisoft.com> References: <199703041926.LAA24593@dirac.phys.washington.edu> <199703042044.NAA10311@phaeton.artisoft.com> Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk [ Lots of explicit gobbly-gook that shows the people doing the JAVA stuff haven't done much with JAVA and/or the JDK. > The reason for the terminal component interpretation, including the > globbing, in the kernel is that you want to interpret "name" as if > the user had typed "name.class" by virtue of the JAVA execution class > loader grovelling for "name". Hmm, when I run java programs, I tye 'java name', NOT 'java name.class'. Now, when I compile I type 'javac name.java', but that's another story altogether. The JDK interpreter must go off and find the Class 'name' somewhere in it's CLASSPATH, and *that's* IMHO the biggest impediment to this whole ordeal. Until SUN and/or one of the other folks standardize on a way to run JAVA programs w/out CLASSPATH it's simply not going to work. It's the interpreters responsibility to find the correct class. All a 'java' activator can do is check in the current proceses directory, or check to see if an explicit pathname was given (thus needing to append the .class on the end). Otherwise it has to grovel around in the CLASSPATH, zipfiles, etc.. and the kernel has no good reason to do that. Ex: CLASSPATH .:/usr/local/jdk/lib/classes.zip % java sun.tools.javac.Main use: javac [-g][-O][-debug][-depend][-jws][-nowarn][-verbose][-classpath path][-nowrite][-d dir] file.java... No tell me an easy way for the kernel to do this: % sun.tools.javac.Main use: javac [-g][-O][-debug][-depend][-jws][-nowarn][-verbose][-classpath path][-nowrite][-d dir] file.java... That's why the 'script' method as suggested by the saner arguers currently the best approach, and the approach SUN used for javac % cat javac #!/bin/sh `dirname $0`/java -ms8m sun.tools.javac.Main $* Nate