1

I am using IPython Notebook on Windows 7 which needs to call Java executables (.jar)

I set JAVA_HOME to 'C:/Program Files/Java/jdk1.8.0_11/bin' where my jdk is installed, but when I run the program I get the error "... unable to find the java executable!"

1 Answer 1

2

Finally I've found a solution adding those lines to my IPython Notebook

import os
java_home = os.environ.get('JAVA_HOME', None)
if not java_home:
    java_path = 'C:/Program Files/Java/jdk1.8.0_11/bin'
    os.environ['JAVA_HOME'] = java_path
else:
    print(java_home)
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.