{"action":"created","issue":{"url":"https://api.github.com/repos/bcdev/jpy/issues/62","repository_url":"https://api.github.com/repos/bcdev/jpy","labels_url":"https://api.github.com/repos/bcdev/jpy/issues/62/labels{/name}","comments_url":"https://api.github.com/repos/bcdev/jpy/issues/62/comments","events_url":"https://api.github.com/repos/bcdev/jpy/issues/62/events","html_url":"https://github.com/bcdev/jpy/issues/62","id":106405196,"node_id":"MDU6SXNzdWUxMDY0MDUxOTY=","number":62,"title":"Add search for JAVA_HOME based on \"which java\"","user":{"login":"lukehutch","id":811305,"node_id":"MDQ6VXNlcjgxMTMwNQ==","avatar_url":"https://avatars3.githubusercontent.com/u/811305?v=4","gravatar_id":"","url":"https://api.github.com/users/lukehutch","html_url":"https://github.com/lukehutch","followers_url":"https://api.github.com/users/lukehutch/followers","following_url":"https://api.github.com/users/lukehutch/following{/other_user}","gists_url":"https://api.github.com/users/lukehutch/gists{/gist_id}","starred_url":"https://api.github.com/users/lukehutch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/lukehutch/subscriptions","organizations_url":"https://api.github.com/users/lukehutch/orgs","repos_url":"https://api.github.com/users/lukehutch/repos","events_url":"https://api.github.com/users/lukehutch/events{/privacy}","received_events_url":"https://api.github.com/users/lukehutch/received_events","type":"User","site_admin":false},"labels":[{"id":69823705,"node_id":"MDU6TGFiZWw2OTgyMzcwNQ==","url":"https://api.github.com/repos/bcdev/jpy/labels/enhancement","name":"enhancement","color":"84b6eb","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/bcdev/jpy/milestones/7","html_url":"https://github.com/bcdev/jpy/milestone/7","labels_url":"https://api.github.com/repos/bcdev/jpy/milestones/7/labels","id":1293744,"node_id":"MDk6TWlsZXN0b25lMTI5Mzc0NA==","number":7,"title":"1.0","description":"First non-draft release","creator":{"login":"bcdev","id":204499,"node_id":"MDQ6VXNlcjIwNDQ5OQ==","avatar_url":"https://avatars2.githubusercontent.com/u/204499?v=4","gravatar_id":"","url":"https://api.github.com/users/bcdev","html_url":"https://github.com/bcdev","followers_url":"https://api.github.com/users/bcdev/followers","following_url":"https://api.github.com/users/bcdev/following{/other_user}","gists_url":"https://api.github.com/users/bcdev/gists{/gist_id}","starred_url":"https://api.github.com/users/bcdev/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bcdev/subscriptions","organizations_url":"https://api.github.com/users/bcdev/orgs","repos_url":"https://api.github.com/users/bcdev/repos","events_url":"https://api.github.com/users/bcdev/events{/privacy}","received_events_url":"https://api.github.com/users/bcdev/received_events","type":"User","site_admin":false},"open_issues":14,"closed_issues":0,"state":"open","created_at":"2015-09-07T13:04:07Z","updated_at":"2015-09-15T08:00:23Z","due_on":"2015-10-14T07:00:00Z","closed_at":null},"comments":4,"created_at":"2015-09-14T18:52:25Z","updated_at":"2018-12-10T20:12:38Z","closed_at":null,"author_association":"NONE","body":"In my runtime environment, I can't rely on JAVA_HOME being set (or even necessarily determinable at compiletime), but would still like JVM detection to happen automatically. The following works for my environment:\n\n```\nfrom subprocess import check_output\njava_bin = check_output([\"which\", \"java\"])\nif java_bin:\n  # Strip off the \"/bin/java\" suffix\n  java_home = \"/\".join(java_bin.split(\"/\")[:-2])\n```\n\nCan this be added as a fallback when the other JAVA_HOME mechanisms fail to find the DLL/.so?\n\nWithout this, at runtime I get an \"undefined symbol: JNI_CreateJavaVM\" error message, which is cryptic.\n"},"comment":{"url":"https://api.github.com/repos/bcdev/jpy/issues/comments/445955977","html_url":"https://github.com/bcdev/jpy/issues/62#issuecomment-445955977","issue_url":"https://api.github.com/repos/bcdev/jpy/issues/62","id":445955977,"node_id":"MDEyOklzc3VlQ29tbWVudDQ0NTk1NTk3Nw==","user":{"login":"ShaheedHaque","id":4881193,"node_id":"MDQ6VXNlcjQ4ODExOTM=","avatar_url":"https://avatars3.githubusercontent.com/u/4881193?v=4","gravatar_id":"","url":"https://api.github.com/users/ShaheedHaque","html_url":"https://github.com/ShaheedHaque","followers_url":"https://api.github.com/users/ShaheedHaque/followers","following_url":"https://api.github.com/users/ShaheedHaque/following{/other_user}","gists_url":"https://api.github.com/users/ShaheedHaque/gists{/gist_id}","starred_url":"https://api.github.com/users/ShaheedHaque/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ShaheedHaque/subscriptions","organizations_url":"https://api.github.com/users/ShaheedHaque/orgs","repos_url":"https://api.github.com/users/ShaheedHaque/repos","events_url":"https://api.github.com/users/ShaheedHaque/events{/privacy}","received_events_url":"https://api.github.com/users/ShaheedHaque/received_events","type":"User","site_admin":false},"created_at":"2018-12-10T20:12:38Z","updated_at":"2018-12-10T20:12:38Z","author_association":"NONE","body":"If Python 3.3 or newer is acceptable, there is a [shutil.which](https://docs.python.org/dev/library/shutil.html#shutil.which), which might provide the desired portability."}}
{"actor":{"display_login":"ShaheedHaque"}}