-
Notifications
You must be signed in to change notification settings - Fork 91
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
change java path search + java 10 support #1741
Conversation
fix java executable in two possible places problem
To me it looks good. I can't however speak so much to the Java specifics. Anybody else can confirm, @brockho @asmaatamna ? |
Btw I wouldn't call this the perfect solution, I'm not sure if it addresses all Linux distributions. Still, I think it's better to look for the Java executable then file named |
@brockho @asmaatamna , could you have a look at it and in case merge? |
The code looks fine for me as well. I don't know much about Java files location under Linux though. I checked quickly on my Mac and the path returned after |
Testing the proposed code on our Jenkins linux slave revealed that with the new code exactly the
We should therefore not accept the pull request at the moment. |
Jenkins runs this test on the Linux machine right? Path to |
Good catch for the Windows/Linux issue. I don't know at all what is going on. A bit more investigation gave that
gives indeed Moreover, calling
from the shell (as user Don't know whether this helps. |
@nikohansen suggested today to use a system call (via |
…issues (#1741 does not merge without conflict anymore these days)
…-bbobbiobjext-2 accorrding to pr #1741
According to https://stackoverflow.com/questions/1117398/java-home-directory-in-linux (thanks @ttusar ), for linux and mac, this gets us the java_home:
For windows, it's slightly different:
|
BTW, this last trick can only be used since JDK1.7 |
Just FTR: the final "trick" was to simply abandon the |
Hi
I think that it's a bad idea to use
locate
indo.py
to search forjni.h
header filelocate
If we search for a
java
binary we can findjre
orjdk
directory and then get to theinclude
folder.Also in java 10 there is no
javah
binary, onlyjavac
with flag-h
.