mirror of https://github.com/jlizier/jidt
Adding error check on python demo 1 that script is called from correct demos/python directory
This commit is contained in:
parent
8c5aa51f57
commit
a278060056
|
@ -23,9 +23,12 @@
|
|||
import jpype
|
||||
import random
|
||||
import numpy
|
||||
import os
|
||||
|
||||
# Change location of jar to match yours:
|
||||
jarLocation = "../../infodynamics.jar"
|
||||
# Change location of jar to match yours (we assume script is called from demos/python):
|
||||
jarLocation = os.path.join(os.getcwd(), "..", "..", "infodynamics.jar");
|
||||
if (not(os.path.isfile(jarLocation))):
|
||||
exit("infodynamics.jar not found (expected at " + os.path.abspath(jarLocation) + ") - are you running from demos/python?")
|
||||
# Start the JVM (add the "-Xmx" option with say 1024M if you get crashes due to not enough memory space)
|
||||
jpype.startJVM(jpype.getDefaultJVMPath(), "-ea", "-Djava.class.path=" + jarLocation)
|
||||
|
||||
|
|
Loading…
Reference in New Issue