00001 #ifndef _classpath_h_included_ 00002 #define _classpath_h_included_ 00003 00004 /*! 00005 * @file classpath.h 00006 * 00007 * @brief Implementation of the @b CLASSPATH environment heuristic. 00008 * 00009 * The Java Virtual Machine Specification, version 2, 00010 * says absolutely NOTHING about the @b CLASSPATH 00011 * item, neither as an environment variable, a JVM command line 00012 * parameter, or anything. Instead, section 5.3.1 states, "The 00013 * Java virtual machine searches for a purported representation 00014 * of [class] C in a platform-dependent manner. Note that there 00015 * is no guarantee that a purported representation found is valid 00016 * or is a representation of C. Typically, a class or interface 00017 * will be represented using a file in a hierarchiacal file system. 00018 * The name of the class or interface will usually be encoded in 00019 * the pathname of the file." 00020 * 00021 * This is the industry standard practice, as implemented by use 00022 * of the @b CLASSPATH variable. This header file defines its 00023 * characteristics. The same goes for the JAVA_PATH environment 00024 * variable, which has no further definitions that its name and 00025 * string content that contains a path name. Since these variables 00026 * are actually a part of standard practice, their names are actually 00027 * defined in @link jvm/src/jvmcfg.h jvmcfg.h@endlink instead of 00028 * here, but @b CLASSPATH behavior is defined here. 00029 * 00030 * Conventions for OS file systems (see also 00031 * @link jvm/src/jvmcfg.h jvmcfg.h@endlink for 00032 * JVMCFG_PATHNAME_xxx and JVMCFG_EXTENSION_xxx definitions). 00033 * 00034 * @verbatim 00035 00036 Unix style: CLASSPATH="/path/name1:/path/name2/filename.jar" 00037 00038 Windows style: CLASSPATH="c:\path\name1;d:\path\name2\\filename.jar" 00039 00040 @endverbatim 00041 * 00042 * @section Control 00043 * 00044 * \$URL: https://svn.apache.org/path/name/classpath.h $ \$Id: classpath.h 0 09/28/2005 dlydick $ 00045 * 00046 * Copyright 2005 The Apache Software Foundation 00047 * or its licensors, as applicable. 00048 * 00049 * Licensed under the Apache License, Version 2.0 ("the License"); 00050 * you may not use this file except in compliance with the License. 00051 * You may obtain a copy of the License at 00052 * 00053 * http://www.apache.org/licenses/LICENSE-2.0 00054 * 00055 * Unless required by applicable law or agreed to in writing, 00056 * software distributed under the License is distributed on an 00057 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 00058 * either express or implied. 00059 * 00060 * See the License for the specific language governing permissions 00061 * and limitations under the License. 00062 * 00063 * @version \$LastChangedRevision: 0 $ 00064 * 00065 * @date \$LastChangedDate: 09/28/2005 $ 00066 * 00067 * @author \$LastChangedBy: dlydick $ 00068 * Original code contributed by Daniel Lydick on 09/28/2005. 00069 * 00070 * @section Reference 00071 * 00072 */ 00073 00074 ARCH_COPYRIGHT_APACHE(classpath, h, "$URL: https://svn.apache.org/path/name/classpath.h $ $Id: classpath.h 0 09/28/2005 dlydick $"); 00075 00076 00077 /*! 00078 * @brief Delimiter betwen members of @b CLASSPATH string 00079 * 00080 */ 00081 #ifdef CONFIG_WINDOWS 00082 #define CLASSPATH_ITEM_DELIMITER_CHAR ';' 00083 00084 #else 00085 #define CLASSPATH_ITEM_DELIMITER_CHAR ':' 00086 00087 #endif 00088 00089 00090 /*! 00091 * @name File extensions 00092 * 00093 * @brief Convention for class file names, but not mandatory. 00094 * 00095 */ 00096 00097 /*@{ */ 00098 00099 #define CLASSFILE_EXTENSION_DEFAULT "class" 00100 #define CLASSFILE_EXTENSION_JAR "jar" 00101 #define CLASSFILE_EXTENSION_ZIP "zip" 00102 00103 /*@} */ 00104 00105 00106 00107 /* Prototypes for functions in 'classpath.c' */ 00108 extern rvoid classpath_init(rvoid); 00109 extern rvoid classpath_shutdown(rvoid); 00110 00111 extern rboolean classpath_isjar(rchar *pclasspath); 00112 00113 extern rchar *classpath_external2internal_classname(rchar *clsname); 00114 00115 extern 00116 rchar *classpath_external2internal_classname_inplace(rchar *inoutbfr); 00117 00118 extern rchar *classpath_get_from_prchar(rchar *clsname); 00119 00120 extern rchar *classpath_get_from_cp_entry_utf(cp_info_dup *clsname); 00121 00122 00123 #endif /* _classpath_h_included_ */ 00124 00125 /* EOF */ 00126