1 /* 2 * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 4 * 5 * This code is free software; you can redistribute it and/or modify it 6 * under the terms of the GNU General Public License version 2 only, as 7 * published by the Free Software Foundation. 8 * 9 * This code is distributed in the hope that it will be useful, but WITHOUT 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 12 * version 2 for more details (a copy is included in the LICENSE file that 13 * accompanied this code). 14 * 15 * You should have received a copy of the GNU General Public License version 16 * 2 along with this work; if not, write to the Free Software Foundation, 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 18 * 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20 * or visit www.oracle.com if you need additional information or have any 21 * questions. 22 * 23 */ 24 25 #ifndef JAVA_MD_H 26 #define JAVA_MD_H 27 28 #include <jni.h> 29 #include <windows.h> 30 #include <io.h> 31 32 #ifndef GAMMA 33 #include "manifest_info.h" 34 #endif 35 36 #include "jli_util.h" 37 38 #ifdef GAMMA 39 #define stricmp _stricmp 40 #define strnicmp _strnicmp 41 #define snprintf _snprintf 42 #endif 43 44 #define PATH_SEPARATOR ';' 45 #define FILESEP "\\" 46 #define FILE_SEPARATOR '\\' 47 #define IS_FILE_SEPARATOR(c) ((c) == '\\' || (c) == '/') 48 #define MAXPATHLEN MAX_PATH 49 #define MAXNAMELEN MAX_PATH 50 51 #ifdef JAVA_ARGS 52 /* 53 * ApplicationHome is prepended to each of these entries; the resulting 54 * strings are concatenated (separated by PATH_SEPARATOR) and used as the 55 * value of -cp option to the launcher. 56 */ 57 #ifndef APP_CLASSPATH 58 #define APP_CLASSPATH { "\\lib\\tools.jar", "\\classes" } 59 #endif 60 #endif 61 62 /* 63 * Support for doing cheap, accurate interval timing. 64 */ 65 extern jlong CounterGet(void); 66 extern jlong Counter2Micros(jlong counts); 67 68 #ifdef JAVAW 69 #define main _main 70 extern int _main(int argc, char **argv); 71 #endif 72 73 /* 74 * Function prototypes. 75 */ 76 #ifndef GAMMA 77 char *LocateJRE(manifest_info *info); 78 #endif 79 void ExecJRE(char *jre, char **argv); 80 int UnsetEnv(char *name); 81 82 #endif