Deprecating ps(1)s -w switch
alex-goncharov at comcast.net
Wed Aug 26 16:24:12 UTC 2009
,--- You/Dag-Erling (Wed, 26 Aug 2009 16:20:59 +0200) ----*
| Tim Kientzle <kientzle at freebsd.org> writes:
| > The difference between "ps", "ps -w", and "ps -ww" is pretty
| > significant for Java, in particular. Java command lines
| > are typically enormous (thank you, CLASSPATH) which makes
| > "ps -ww" often more annoying than it's worth.
| Java command lines aren't necessarily enormous. If they are, it is
| because whoever invoked Java didn't know that it respects the CLASSPATH
| environment variable, and that setting -classpath on the command line
| f*s up the user's preferences (e.g. the user may want to replace a
| particular set of classes with an alternative implementation).
Using either the `-classpath' option to `java' or `CLASSPATH'
environment variable is a pretty obsolete practice (whoever does
either these days, should stop and re-think, IMHO.)
The deficiency of the above, in either variation, is the need to list
every `jar' file used, which gets ugly with more than a few files.
A persons who keeps up with modern Java will call it with one or
several of the options:
Java Virtual Machine will internally list the files in each of the
directories (specified on the command line or default ones), saving a
user the effort to mention them explicitly in `CLASSPATH'.
This cuts on the length of the command line dramatically, but still
`java' processes' command lines are typically enormously long: even
the lists of the directories, with their absolute paths are
significant; on top of it, `java' is usually invoked with a gazillion
of options modifying JVM's runtime behaviour.
It's a fact of life that for real-life applications, `java' command
lines are *long* -- you can't change that by moving from `-classpath'
(This said, I am not in favor of modifying `ps' in the manner
proposed, as my previous message indicated.)
-- Alex -- alex-goncharov at comcast.net --
More information about the freebsd-hackers