Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 4 Mar 1997 15:10:45 -0700 (MST)
From:      Nate Williams <nate@mt.sri.com>
To:        Terry Lambert <terry@lambert.org>
Cc:        somsky@dirac.phys.washington.edu (William R. Somsky), hackers@freefall.freebsd.org
Subject:   Re: java support under FreeBSD.
Message-ID:  <199703042210.PAA01575@rocky.mt.sri.com>
In-Reply-To: <199703042044.NAA10311@phaeton.artisoft.com>
References:  <199703041926.LAA24593@dirac.phys.washington.edu> <199703042044.NAA10311@phaeton.artisoft.com>

next in thread | previous in thread | raw e-mail | index | archive | help
[
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199703042210.PAA01575>