private static void assertEnvironment ( Path graknHome , Path graknProperties ) { String javaVersion = System . getProperty ( "java.specification.version" ) ; if ( ! javaVersion . equals ( "1.8" ) ) { throw new RuntimeException ( ErrorMessage . UNSUPPORTED_JAVA_VERSION . getMessage ( javaVersion ) ) ; } if ( ! graknHome . resolve ( "conf" ) . toFile ( ) . exists ( ) ) { throw new RuntimeException ( ErrorMessage . UNABLE_TO_GET_GRAKN_HOME_FOLDER . getMessage ( ) ) ; } if ( ! graknProperties . toFile ( ) . exists ( ) ) { throw new RuntimeException ( ErrorMessage . UNABLE_TO_GET_GRAKN_CONFIG_FOLDER . getMessage ( ) ) ; } }
Basic environment checks . Grakn should only be ran if users are running Java 8 home folder can be detected and the configuration file grakn . properties exists .