| Path: | lib/rcdk/java.rb |
| Last Update: | Sat Oct 28 12:54:39 -0700 2006 |
RCDK - The Chemistry Development Kit for Ruby
Project Info: rubyforge.org/projects/rcdk Blog: 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.
Adds the fully-qualified path path_to_jarfile to the CLASSPATH environment variable. Any jarfiles added after the first invocation of a Java constructor will be globally ignored, i.e., require all jarfiles first in your program before constructing objects from them.
# File lib/rcdk/java.rb, line 34
34: def require_jar(path_to_jarfile)
35: if classpath_set?
36: ENV['CLASSPATH'] = ENV['CLASSPATH'] + File::PATH_SEPARATOR + path_to_jarfile
37: else
38: ENV['CLASSPATH'] = path_to_jarfile
39: end
40: end