Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non default JAVA_HOME makes wrapper fail #14

Open
ascheman opened this issue Oct 21, 2021 · 2 comments
Open

Non default JAVA_HOME makes wrapper fail #14

ascheman opened this issue Oct 21, 2021 · 2 comments

Comments

@ascheman
Copy link
Contributor

If java is not on a default path (as set by /etc/default/login or other means), the wrapper fails since the executable cannot be found when doctoolchain is finally called.

The reason for this is the call to bash with the -l flag in line 37:

bash -cl "$command"

This causes bash to work as login shell and reset any environment variables to their login defaults.

@ascheman ascheman changed the title Non default JAVA_HOME make wrapper fail Non default JAVA_HOME makes wrapper fail Oct 21, 2021
@rdmueller
Copy link
Member

ok, here is why i added the line

export JAVA_HOME=

to the dtcw. dtcw checks for the correct java version by trying to execute it. This mostly uses the java version which is found on the path. It seems that gradle preferes the java version configured in JAVA_HOME - so there are cases when there versions differ. Then dtcw might say the java version is ok, but gradle picks up a version too high.

But gradle uses the version on the path if JAVE_HOME is not set. So I thought it is a good idea to deactive it.

But it seems it wasn't. Let's remove the line again.

rdmueller added a commit that referenced this issue Oct 21, 2021
Do not call bash as login shell finally (#14)
rdmueller added a commit that referenced this issue Oct 21, 2021
remove unsetting of JAVE_HOME (#14)
@rdmueller
Copy link
Member

I think this is solved, isn't it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants