[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [lmi] Path for "java"
From: |
Vadim Zeitlin |
Subject: |
Re: [lmi] Path for "java" |
Date: |
Wed, 15 May 2019 02:13:37 +0200 |
On Wed, 15 May 2019 00:07:18 +0000 Greg Chicares <address@hidden> wrote:
GC> [I sent email containing this:
GC>
GC> > [I've mangled these commands so that they don't
GC> > get clobbered by "security" software--where I've written
GC> > lowercase X Y and Z, substitute lowercase E X and E]:
GC> > dir /s java.xyz
GC> > If that doesn't work, try:
GC> > where java.xyz
GC>
GC> to a corporate address today, but their "security" software
GC> mangled both commands beyond recognition, and I had to read
GC> them over the telephone. If I didn't speak with you on the
GC> telephone today, you can ignore this message.]
You didn't speak with me, but I can't abstain from pointing out that:
[...]
GC> ...I speculate that this command:
GC>
GC> PATH="C:/Program\ Files\ \(x86\)/Common\ Files/Oracle/Java/javapath" java
-version
GC>
GC> will do the expected thing in a cygwin terminal, so I've
GC> added that string to the $PATH in commit 87c94d43. But it's
GC> hard to guess whether I cygwin-ified that correctly,
The PATH environment variable is supposed to be in Unix format under
Cygwin and so the above will _not_ work because the colon, in its second
position, will be interpreted as a separator, i.e. you'd be setting up a
PATH with 2 directories, "c:" and "/Program Files/...".
The correct command morally equivalent to the one above would be
PATH="/cygdrive/c/Program\ Files\ \(x86\)/Common\
Files/Oracle/Java/javapath" java -version
but I'd also append to the PATH rather than replacing it just in case java
itself expects to find some DLLs in the standard PATH (which is unlikely
but not impossible), so my recommended command would be:
PATH="/cygdrive/c/Program\ Files\ \(x86\)/Common\
Files/Oracle/Java/javapath:$PATH" java -version
Hope this helps,
VZ