I am running into an issue on systems that use the "module"
infrastructure to set up paths, etc., when using Jenkins to
launch a slave via ssh.

The first issue is that the location of java is not known
until one does "module load java", and "module" is not known
until a system file,  /global/homes/skel/read-only/.bashrc,
is sourced.  Once all that is solved, Jenkins initial call
to get the java version fails, because these machines do not
allow startup with default parameters.


$ java -version
Error occurred during initialization of VM
Could not reserve enough space for object heap
Could not create the Java virtual machine.

I have now solved this problem by wrapping the system java with

$ cat java.sh
#!/bin/bash -lxe
#
# Java needs memory setting on freedom
#
java -Xmx1850M $*

but I have a nagging feeling that there must have been an
easier way to:

1. Set the environment before the first call to "java -version"

2. Give java args for that call.

Would love to hear of a more elegant solution.

THx....John Cary

Reply via email to