Provide classpath instead of jar when invoking java #933
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
When starting a Selenium process in a container, the startup script invokes the
java
command with the-jar
option. However, it's not possible to add classpaths when running a Selenium process even if we use theJAVA_OPTS
because when the-jar
option is used, the-cp
option which provides classpaths is ignored. If we want to use a custom proxy or an add-on as a Jar file without changing a container,-cp
is needed.This pull request makes a change to the startup scripts to use
-cp
instead of-jar
and introduce theJAVA_CLASSPATH
environment variable to overwrite the default classpaths.This shouldn't break existing usages without providing the
JAVA_CLASSPATH
environment variable.Do you think this is valuable to have? If so, I'll update the README file as well.
X
in the preceding checkbox, I verify that I have signed the Contributor License Agreement