From 7068b37d693f9e43adc8ed7f33b14aebd0f9a45c Mon Sep 17 00:00:00 2001 From: tshirtman Date: Thu, 3 Jan 2013 13:12:40 +0100 Subject: [PATCH] fix classpath for windows and CLASSPATH definition --- jnius/jnius_jvm_desktop.pxi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/jnius/jnius_jvm_desktop.pxi b/jnius/jnius_jvm_desktop.pxi index 0e26971..b8aed0e 100644 --- a/jnius/jnius_jvm_desktop.pxi +++ b/jnius/jnius_jvm_desktop.pxi @@ -20,19 +20,19 @@ def classpath(): import platform from glob import glob from os import environ - from os.path import realpath, dirname + from os.path import realpath, dirname, join if platform.system() == 'Windows': split_char = ';' else: split_char = ':' - paths = [realpath('.'), dirname(__file__) + '/src/org/', ] + paths = [realpath('.'), join(dirname(__file__), 'src', 'org'), ] if 'CLASSPATH' not in environ: return split_char.join(paths) cp = environ.get('CLASSPATH') - pre_paths = cp.split(split_char) + pre_paths = paths + cp.split(split_char) # deal with wildcards for path in pre_paths: if not path.endswith('*'):