def set_ij_env(ij_dir): """ Create a list of required jars and add to the java classpath :param ij_dir: System path for Fiji.app :return: num_jar(int): number of jars added """ jars = [] # search jars directory jars.extend(search_for_jars(ij_dir, '/jars')) # search plugins directory jars.extend(search_for_jars(ij_dir, '/plugins')) # add to classpath scyjava_config.add_classpath(os.pathsep.join(jars)) return len(jars)
def _init_jvm_options(): import scyjava_config PAINTERA_ENDPOINT = 'org.janelia.saalfeldlab:paintera:{}'.format(_paintera_version) RELEVANT_MAVEN_REPOS = {'scijava.public' : 'https://maven.scijava.org/content/groups/public'} for _, repo in scyjava_config.get_repositories().items(): if 'scijava.public' in RELEVANT_MAVEN_REPOS and repo == RELEVANT_MAVEN_REPOS['scijava.public']: del RELEVANT_MAVEN_REPOS['scijava.public'] scyjava_config.add_endpoints(PAINTERA_ENDPOINT, '{}'.format(os.getenv('PAINTERA_SLF4J_BINDING', 'org.slf4j:slf4j-simple:1.7.25'))) scyjava_config.add_repositories(RELEVANT_MAVEN_REPOS) scyjava_config.add_classpath(_jfx_rt_jar) return scyjava_config