Re: Java wrappers and java-common
Hello,
Eric Lavarde wrote:
> comparing the wrapper script from FreeMind, version 0.9.0, not yet in
> Debian [1], and your script, I'm missing the following features:
>
> - no check that JAVA_CMD actually exists and is executable if the
> variable is set.
I've modified that.
> - /usr/bin/java as last fallback if nothing else helps.
I used simply java, which leaves up to the sysadmin the possibility to
have something is /usr/local/bin. It is done in run_java.
> - debug output of java version found, and how the java command was found
> (it helps a great lot when users ask for help and have e.g. a dangling
> environment variable).
When DEBUG_WRAPPERS is set, the JAVA_HOME found is written.
> - a warning if the find_java_runtime is called with criteria and the
> java command returned doesn't respect those criteria: i.e. JAVA_CMD is
> set to gcj, and the script asks for 'sun'. I don't have a good solution
> for this one, but it also helps avoiding bug reports where the user
> forces the wrong Java command.
I don't think we'll manage this correctly. In any bug report, we would
have to ask the output of DEBUG_WRAPPERS=1 command.
> - the ability to ask for a maximum Sun version, as certain Java programs
> don't work with newer versions. Perhaps create things like sunmin5 and
> sunmax5 variables and be able to ask for those!?
Done.
> - in my script, I also use JAVA_BINDIR to find the "right" java command.
> It's a SuSE thing, but if we try to be truly cross-platform, we should
> also consider it.
Done
> - I would define $DESTDIR/usr/share/java once as a variable and reuse it
> throughout the functions.
Done. I've also provided a way to customize that should the need
arise. I don't think DESTDIR will be of use to any but a developer.
Maybe one day I'll try to turn that into a real path lookup, like for
PATH. Not today.
> - I also defined a variable ADD_JARS which is put in front of the
> CLASSPATH.
Defining JAVA_CLASSPATH beforehand does the trick with what I wrote.
Is there a need for another way to do so ?
> - the CLASSPATH variable is also used by the java command, do we have
> here a consistent behavior across all binaries?
I don't know. Apparently, from cacao, sun5, sun6 and gij, the
-classpath environment variable necessarily overrides the CLASSPATH
settings. Which means that if there is a call to find_jar, it is
useless. But I provided debug output for it nevertheless.
Modifications just committed, many thanks !
Vincent
--
Vincent Fourmond, Debian Developer
http://vince-debian.blogspot.com/
-- pretty boring signature, isn't it ?
Reply to: