# =============================================
# RCDK - The Chemistry Development Kit for Ruby
# =============================================
#
# Project Info: http://rubyforge.org/projects/rcdk
# Blog: http://depth-first.com
#
# Copyright (C) 2006 Richard L. Apodaca
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1 as published by the Free Software
# Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
# Boston, MA 02111-1301, USA.

CDK_VERSION = '1.2.3-with-jcpprim'
BATIK_VERSION = '1.7'

require 'rcdk/java'

libpath = "../java/lib"

classpath = ENV['CLASSPATH'] ||= ''
classpath += File.join(File.dirname(__FILE__), libpath, 'cdk-' + CDK_VERSION + '.jar')
classpath += File::PATH_SEPARATOR + File.join(File.dirname(__FILE__), libpath, 'batik-' + BATIK_VERSION + '.jar')

load_jvm(classpath)

# =============================================
# RCDK - The Chemistry Development Kit for Ruby
# =============================================
#
# Project Info: http://rubyforge.org/projects/rcdk
# Blog: http://depth-first.com
#
# Copyright (C) 2006 Richard L. Apodaca
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License version 2.1 as published by the Free Software
# Foundation.
#
# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
# Lesser General Public License for more details.
#
# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free
# Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor
# Boston, MA 02111-1301, USA.

CDK_VERSION = '1.2.3-with-jcpprim'
BATIK_VERSION = '1.7'

require 'rcdk/java'

libpath = "../java/lib"

classpath = ENV['CLASSPATH'] ||= ''
classpath += File::PATH_SEPARATOR + File.join(File.dirname(__FILE__), libpath, 'cdk-' + CDK_VERSION + '.jar')
classpath += File::PATH_SEPARATOR + File.join(File.dirname(__FILE__), libpath, 'batik-' + BATIK_VERSION + '.jar')

load_jvm(classpath)

Fix for when CLASSPATH environment path is set
Fix for when CLASSPATH environment path is set

Say, I had a CLASSPATH of:
export CLASSPATH=opsin-big-0.1.0.jar
rcdk would concatenate that directly to form a classpath of
opsin-big-0.1.0.jarfilelocation/../java/lib/cdk-1.2 ...
giving no colon separation in the path.

This just puts that colon there.
In the case where the classpath is empty, there's an extra colon, but I
don't think that matters.
