From 93109ccab50210de2ae9cc8ea98aeda84e411fc0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Juancarlo=20A=C3=B1ez?= Date: Tue, 21 Aug 2012 14:22:37 -0430 Subject: [PATCH] Make the desktop use CLASSPATH if defined. --- jnius/jnius_jvm_desktop.pxi | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/jnius/jnius_jvm_desktop.pxi b/jnius/jnius_jvm_desktop.pxi index 2208eb9..53d0eb0 100644 --- a/jnius/jnius_jvm_desktop.pxi +++ b/jnius/jnius_jvm_desktop.pxi @@ -22,8 +22,10 @@ cdef void create_jnienv(): cdef JavaVMOption options[1] cdef bytes py_bytes + from os import environ from os.path import realpath - py_bytes = ('-Djava.class.path={0}'.format(realpath('.'))) + cp = environ.get('CLASSPATH') or realpath('.') + py_bytes = ('-Djava.class.path={0}'.format(cp)) options[0].optionString = py_bytes options[0].extraInfo = NULL