On Oct 15, 2009, at 9:40, Bill Janssen <jans...@parc.com> wrote:
Andi Vajda <va...@apache.org> wrote:
Emit an error message that says "sorry, gcj is not supported, please
use OpenJDK or Sun JDK" and abort.
Right. That's the problem, as I see it. If you have Sun Java
installed, it's not necessarily first on your path. But you want to
find it, even if it's masked by gcj. You don't want to abort.
This goes beyond what I had in mind.
The case where you want to use a Java not on the PATH is advanced
enough for either your scripts to handle or the manual edits in
setup.py and Makefile required today.
I was making suggestions in the context of simplifying the common
case: PyLucene users don't care (they're Python users first) what Java
version they use or have and just want it to work (tm). They're happy
to just have one version of Java installed and put it on their PATH. I
could be wrong, of course with 'happy', of course.
Andi..
JAVA_HOME is returned by System.getProperty('java.home'). Java should
know best. If you can build and run that class, it means you have a
JDK and you can now ask it to tell you about itself.
Right. Now, suppose it tells you it's not the right Java, not a Java
that will allow you to use it. What next? I don't see a good
alternative to having some script that has a number of likely search
paths in it, and which searches each possible location until it
finds a
suitable Java. In which case, using Java to find "java.home" isn't
much
use -- you're already looking in some specific spot. Might as well
use
the locate db to find all instances of javac, and search each
directory
you find there.
Bill